下面的javascript,用于打开一个新窗口
和
跳转到一个指定的锚,在IE中效果很好。不幸的是,在Firefox中,它打开了窗口,但没有跳转到锚。
我已经为这个问题苦苦挣扎了几天了(搜索和修改),但都无济于事。
如果有人知道我如何才能让这两个工作
和
Mozilla浏览器,我将永远感激。
下面是包含window.open()的javascript函数和调用包含window.open()函数的链接:
<html>
<head>
<script language=javascript>
function openPopupWindow_Why(sPopupUrl, sPopupLabel)
{
window.open(sPopupUrl, sPopupLabel, 'toolbar=no,resizable=yes,
scrollbars=yes,height=250,width=450', false);
return false;
}
</script>
</head>
<body>
<A onclick="openPopupWindow_Why('MyProfile_WhyAsk.htm#ethnicity', 'Why')"
href="javascript:void(0)" class="WhyAsk">Why do we ask?</a>
</body>
</html>
这是window.open()打开的页面上的HTML锚:
<tr>
<td align="center">
<a name="#ethnicity"> </a>
</td>
</tr>