window.open无法在IE中工作

时间:2011-08-02 18:06:56

标签: javascript html explorer

试着让它运行,在Firefox,Safari,Chrome等运行,但是IE7没有打开弹出栏,在控制台我只是得到“无效的参数”

是在图像的onclick

<img style="cursor: hand; cursor: pointer;" onclick='window.open("http://www.test.com", "Image Gallery", "width=850,height=1000,resizable=no,menubar=no");' src="thumb.jpg" width="64" height="64"/>

1 个答案:

答案 0 :(得分:4)

目标不允许有空格。

<img style="cursor: hand; cursor: pointer;" onclick='window.open("http://www.test.com", "Image_Gallery", "width=850,height=1000,resizable=no,menubar=no");' src="thumb.jpg" width="64" height="64"/>
相关问题