IE6,IE7 下的 - Expected identifier, string or number

来源:互联网 发布:如何清除数据库日志 编辑:程序博客网 时间:2024/05/17 08:05

 
 
 
 
 
 
 
 
 
 
 
 
 
 

IE6,IE7 下的 - Expected identifier, string or number

javascript:
{'xxx':xxx, }IE6,IE7 在解释这类似代码的时候会认为最后还有一个空元素,这就导致的错误。
例如:

 $(function() {      $('.right-r').click(function() {        var indexId = $(this).attr("indexId");        var html = $("#box-" + indexId).html();        $.dialog({          content : html,          width : 350,          height : 160,          modal : true,          autoCloseTime : 100000000,(IE6,IE7会认为后面还有内容)        });      });

    });

原创粉丝点击