缺少)在JS中的response.write上的参数列表“+”之后

时间:2013-03-30 04:50:25

标签: javascript string concat

response.write('Your case has been submitted successfully and you should receive an email notification soon.<br><br>The Case# is"+caseId+"<br><h2>title</h2>');

如果我将连接值移动到字符串的末尾,则可以完美地工作,但如果我想将它放在Text的中间,则不会。这是在网页上的iframe中呈现

3 个答案:

答案 0 :(得分:1)

应该是:

response.write('Your case has been submitted successfully and you should receive an email notification soon.<br><br>The Case# is'+caseId+'<br><h2>title</h2>');

答案 1 :(得分:1)

您的报价不匹配。您从单引号'开始,然后在中间使用双引号"

答案 2 :(得分:0)

  

'+ caseId +'在这里使用单引号..

 'Your case has been submitted successfully and you should receive an email notification soon.<br><br>The Case# is'+caseId+'<br><h2>title</h2>'