显然,此调用window.open在Internet Explorer下无效.我的网站上的Javascript代码没有运行,我认为这是由于该错误.
它告诉我错误是打开的,是对window.open的调用,显然一个参数在那里是无效的.
$('.objeto').click(
function() {
var center = 'height=380,width=900,top='+((screen.width - 900)/2)+',left='+((screen.height - 380)/2);
var address = $(this).attr('id');
window.open (address,'Ver articulo', config=center);
}
);
Run Code Online (Sandbox Code Playgroud)
该网站在Google Chrome和Firefox下运行良好.
我在我的网站上使用这一块jQuery/Javascript代码打开一个弹出窗口:
$('#change_photo_link').click(function(){
$id = $('#id').attr('value');
window.open("photo.upload.php?id=" + $id,"Upload Photo",
"menubar=no,width=430,height=100,toolbar=no");
});
Run Code Online (Sandbox Code Playgroud)
此代码适用于Firefox和Chrome.它不适用于IE7或IE8(尚未测试IE6).IE在该行上弹出错误window.open.为什么?IE给出的错误是"无效参数",这就是全部.