捕获异常

var app_vote_end_time = new Date(2019, 12 - 1, 31, 23, 59, 59);
var app_vote_now_time = new Date();
if (app_vote_now_time > app_vote_end_time) {
try {
document.getElementById("submit_survey").disabled = true;
} catch (e) {}
}

如果执行 document.getElementById("submit_survey").disabled = true;
出现错误,这样页面就不会报错了

posted @ 2014-05-24 16:50  mabel_on_line  阅读(105)  评论(0编辑  收藏  举报