下面是我的锚标记,它在chrome和firefox中工作正常但在IE9中不起作用。
<a style="text-decoration:none;" href="#" onclick="Javascript:openWidgetWindow(1234);return false;"><img style="border:3px solid white;" src="/media/44540/bookafternoonteagrandhall.jpg" alt="Book table">
<br><br>
</a>
我的javascript函数如下
<script language ="javascript" type ="text/javascript">
function openWidgetWindow(restaurantId) {
var theme="My Theme";
var left = (screen.width / 2) - (400 / 2);
var top = (screen.height / 2) - (600 / 2);
window.open("someurlandparameters");
}
</script>
有什么想法吗?感谢
答案 0 :(得分:0)
试试这个
<a style="text-decoration:none;" href="JavaScript:void(0)" onclick="openWidgetWindow(1234);return false;">
<img style="border:3px solid white;" src="/media/44540/bookafternoonteagrandhall.jpg" alt="Book table">