JS报错问题,请高手指点一下,我这段代码为什么会出错。就是第一行出错了
win.innerHTML=closeDiv+minDiv+maxDiv+"\<tableid='"+id+"_row1'class=\"toptable_window\...
win.innerHTML = closeDiv + minDiv + maxDiv + "\
<table id='"+ id +"_row1' class=\"top table_window\">\
<tr>\
<td class='"+ className +"_nw'> </td>\
<td class='"+ className +"_n'><div id='"+ id +"_top' class='"+ className +"_title title_window'>"+ this.options.title +"</div></td>\
<td class='"+ className +"_ne'> </td>\
</tr>\
</table>\
<table id='"+ id +"_row2' class=\"mid table_window\">\
<tr>\
<td class='"+ className +"_w'></td>\
<td id='"+ id +"_table_content' class='"+ className +"_content' valign='top'>" + content + "</td>\
<td class='"+ className +"_e'></td>\
</tr>\
</table>\
<table id='"+ id +"_row3' class=\"bot table_window\">\
<tr>\
<td class='"+ className +"_sw'> </td>\
<td class='"+ className +"_s'><div id='"+ id +"_bottom' class='status_bar'> </div></td>\
<td " + seAttributes + "> </td>\
</tr>\
</table>\
"; 展开
<table id='"+ id +"_row1' class=\"top table_window\">\
<tr>\
<td class='"+ className +"_nw'> </td>\
<td class='"+ className +"_n'><div id='"+ id +"_top' class='"+ className +"_title title_window'>"+ this.options.title +"</div></td>\
<td class='"+ className +"_ne'> </td>\
</tr>\
</table>\
<table id='"+ id +"_row2' class=\"mid table_window\">\
<tr>\
<td class='"+ className +"_w'></td>\
<td id='"+ id +"_table_content' class='"+ className +"_content' valign='top'>" + content + "</td>\
<td class='"+ className +"_e'></td>\
</tr>\
</table>\
<table id='"+ id +"_row3' class=\"bot table_window\">\
<tr>\
<td class='"+ className +"_sw'> </td>\
<td class='"+ className +"_s'><div id='"+ id +"_bottom' class='status_bar'> </div></td>\
<td " + seAttributes + "> </td>\
</tr>\
</table>\
"; 展开
2个回答
展开全部
js不支持字符串断行,改成这样吧
win.innerHTML = closeDiv + minDiv + maxDiv +
"<table id='"+ id +"_row1' class=\"top table_window\">"+
"<tr>"+
"<td class='"+ className +"_nw'> </td>"+
"<td class='"+ className +"_n'><div id='"+ id +"_top' class='"+ className +"_title title_window'>"+ this.options.title +"</div></td>"+
"<td class='"+ className +"_ne'> </td>"+
"</tr>"+
"</table>"+
"<table id='"+ id +"_row2' class=\"mid table_window\">"+
"<tr>"+
"<td class='"+ className +"_w'></td>"+
"<td id='"+ id +"_table_content' class='"+ className +"_content' valign='top'>" + content + "</td>"+
"<td class='"+ className +"_e'></td>"+
"</tr>"+
"</table>"+
"<table id='"+ id +"_row3' class=\"bot table_window\">"+
"<tr>"+
"<td class='"+ className +"_sw'> </td>"+
"<td class='"+ className +"_s'><div id='"+ id +"_bottom' class='status_bar'> </div></td>"+
"<td " + seAttributes + "> </td>"+
"</tr>"+
"</table>";
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询