这个href打开新窗口在ie7中不起作用?

时间:2014-04-08 15:28:13

标签: html css internet-explorer

这个href打开新窗口在ie7中不起作用?在chrome,firefox和其他浏览器都很好,但即7不起作用,我该怎么办?

............................................... .................................................. .................................................. .................

<a href="javascript:window.open('rated.php','Rated','width=618,height=265')">
    Rated
</a>
在chrome,firefox和其他浏览器中都很好,但即7不起作用,我该怎么办?

2 个答案:

答案 0 :(得分:1)

问题似乎是由于您传递给window.open的第二个参数。

http://msdn.microsoft.com/en-us/library/ms536651%28v=vs.85%29.aspx

根据此来源,第二个参数必须将窗口名称指定为_parent_self_top_blank

答案 1 :(得分:1)

<a id="my_link">open window</a>



<script type="text/javascript">
$('#my_link').click(function(){
    $id = $('#id').attr('value');

    window.open("rated.php","rated",
    "menubar=no,width=655,height=280,toolbar=no");
});
</script>