怪事,为什么我用JS输出的HTML标记中加事件会报错?
如下,红色的那段,我加链接标记也不起作用,用个image点击打开报错
function popmsg(msgstr){
var winstr="<table style=\"border: 1 solid #FFA6CA\" width=\"241\" height=\"172\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >";
winstr+="<tr><td height=\"30\" align=\"right\"><img src=\"images/close_over.gif\" /> </td></tr><tr><td align=\"center\"><table width=\"90%\" height=\"110\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
winstr+="<tr><td valign=\"top\" style=\"font-size:15; color: blue; face: Tahoma\">"+msgstr+"</td></tr><tr><td valign=\"top\" style=\"font-size:15; color: blue; face: Tahoma\"><img src=\"images/close_over.gif\" onclick=\"window.open('basic/notice.aspx')\" /> </td></tr></table></td></tr></table>";
oPopup.document.body.innerHTML = winstr;
popshow();
}