Javascript字符串问题
我正在尝试将查询值合并到链接中 ww.test/video(查询值)“.flv” 尽管我认为我做错了什么Javascript字符串问题,javascript,html,Javascript,Html,我正在尝试将查询值合并到链接中 ww.test/video(查询值)“.flv” 尽管我认为我做错了什么 function doSomething() { var test = new StringBuilderEx(); var a = querySt("number"); test.append("<h1>test</h1> "); test.append("<a ");
function doSomething() {
var test = new StringBuilderEx();
var a = querySt("number");
test.append("<h1>test</h1> ");
test.append("<a ");
test.append("href=\"http://test.com/video\"" + a + ".flv\" ");
test.append("Style =\"display:block;width:425px;height:300px;\" ");
test.append("id=\"player\" ");
test.append("</a> ");
test.append("<script language=\"JavaScript\" ");
test.append("> ");
test.append("flowplayer(\"player\" ");
test.append(", \"flowplayer-3.2.2.swf\" ");
test.append("); <\/script>");
return test.toString()
}
函数doSomething(){
var test=新的StringBuilderEx();
var a=查询(“编号”);
测试。附加(“测试”);
test.append(“
这里有一个无关的\“
test.append("href=\"http://test.com/video" + a + ".flv\" ");
还有一个丢失的
test.append("id=\"player\" ");
应该是
test.append("id=\"player\">");
test.append("Click me!</a> ");
此外,您的链接没有可单击的内容
test.append("</a> ");
test.append(“”);
应该是
test.append("id=\"player\">");
test.append("Click me!</a> ");
test.append(“单击我!”);
好吧,这个链接不打算包含任何内容,但您的回答是正确的/:)谢谢