请大神帮忙看看这段js代码为什么报错?
浏览器 控制台查看一直拼命报错:
Noname3.html:191 Uncaught TypeError: Cannot set property 'innerHTML' of null
at getCurDate (Noname3.html:191)
at <anonymous>:1:1
代码 如下: js代码已经在html下面了 不知道为什么还有这情况
<script>
document.writeln("<div class=\'zxswt-zhongjian\' id=\'zxswt-zhongjian\' style=\'display:none;\'>");
document.writeln(" <a style=\'height:30%;display:block;\' href=\"javascript:;\" rel=\"nofollow\" onclick=\"openZoosUrl('chatwin','&e='+escape('/zt/duihua/'));\">");
document.writeln(" <div class=\'zxswt-zxzx\'>");
document.writeln(" <div class=\'zxswt-juli\'></div>");
document.writeln(" <div class=\'zxswt-juli\'></div> ");
document.writeln(" </div>");
document.writeln(" </a>");
document.writeln("<div class=\"con2\">");
document.writeln(" <div class=\"cl\"></div>");
document.writeln("<ul class=\"find\" style=\"margin-top:10px\">");
document.writeln("</ul>");
document.writeln("<div class=\"clear\"></div>");
document.writeln(" </div>");
/*2*/
document.writeln("<div style=\' max-width:640px; margin:0 auto\'>");
document.writeln("<div class=\'center_d\' style=\'width:100%;position:absolute;top:80%; max-width:640px; margin:0 auto;\'>");
document.writeln(" <div style=\'text-align:center;float:left;width: 50%;\'><a style=\'display:inline-block;padding-left: 22%;padding-right: 22%;border:1px solid #cac5b2;border-radius:5px;color:#FFF;background:#C00;font:16px/30px Microsoft YaHei\' href=\'javascript:void(0)\' onclick=\'openZoosUrl();return false\'>111</a></div>");
document.writeln(" <div style=\'text-align:center; float:left;width: 50%;\'><a style=\'display:inline-block;border:1px solid #cac5b2;border-radius:5px;color:#FFF;background:#C00;font:16px/30px Microsoft YaHei;padding-left: 22%;padding-right: 22%;\' href=\'tel:0527-83239999\'>333</a></div>");
document.writeln(" ");
document.writeln("</div>");
document.writeln("</div>");
document.writeln(" <a target=\'_self\' onclick=\'closeWin();return false;\' href=\'javascript:void(0);\'>");
document.writeln("<div class=\"aclose\" id=\"aclose\" style=\"position:absolute;right:5px;top:5px;cursor:pointer;\">");
document.writeln(" <i style=\"float:right;width:23px;height:23px;margin-left:12px;\"><img src=\"images/aclose.png\" alt=\"\" style=\"float:left\"></i><span style=\"color:#fff;font:14px/22px Microsoft YaHei;\">点击关闭</span>");
document.writeln(" </div>");
document.writeln(" </a> ");
document.writeln("</div>");
function add_zero(temp)
{
if(temp<10) return "0"+temp;
else return temp;
}
function closeWin(){
document.getElementById('zxswt-zhongjian').style.display='none';
document.getElementById("LXB_CONTAINER_SHOW").style.display="block";
clearInterval("showMainSwt()");
}
function showMainSwt(){
document.getElementById('zxswt-zhongjian').style.display="block";
document.getElementById("LXB_CONTAINER_SHOW").style.display="none";
}
setTimeout('showMainSwt()',1000);
setInterval("showMainSwt()",1000);
</script>