虽然IE 9测试我的jQuery脚本它显示了错误的jQuery的1.6.2.js - 使用中没有问题的工作的Internet Explorer 9在兼容模式下显示错误
SCRIPT5022: Exception thrown and not caught
jquery-1.6.2.js, line 548 character 3
我的js文件其他浏览器 - Firefox 3.6,5.0,歌剧11,铬,铬。我不明白。在jquery源代码中是否存在错误,或者在我的js文件中是否存在错误?我如何找到它?
自从我在这个领域开始以来,这已经很长时间了,所以请我真的很感激一些想法。
预先感谢您。
[编辑] 我已经添加了完整的代码。 我学到了: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-jquery-image-cropping-plug-in-from-scratch-part-ii/
我不知道要添加哪个部分。整个代码不适合在stackoverflow的提交。 “身体被限制为3000个字符;你输入了42121”
[第二编辑] 我在我的ajax提交中使用了'错误'。
//jquery ajax submit for resizing
function submit(myform,e){
$n.val($image.attr('src').replace(/^[^,]*\//,''));
var mydata = myform.serialize();
$.ajax({
url: $myform.attr('action'),
cache: false,
type:$myform.attr('method'),
data: mydata,
success: function(response){
var img = $("<img />").attr('src', 'images/'+response+'?'+ e.timeStamp) //<-- img name here
.load(function() {
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
alert('Incorrect image.');
} else {
$("#result").html(img); //<-- put cropped img here.
}
});
},
error: function(){ //<-- error used here
$('#result').html("Err. Loading Image");
}
});
};
我的代码是否需要?我正在创建一个jQuery插件,我不知道从哪里产生错误。 – maan81
你的代码将很高兴看到:) –
上面的错误处理程序不能是原因,它是一个不同于jQuery.error() –