a标签的href 和onclick
<script type="text/javascript"> function ClickCount(oId) { if (parseInt(oId)) { $.ajax({ type: "GET", url: "ashx/BulletinClickCount.ashx", data: "id=" + parseInt(oId) + "&rand=" + Math.random(), success: function(msg) { window.open('SysAdmin/BulletinDetail.aspx?id=' + oId, "openwindow", '', '_blank'); } }); } } </script>
a 标签
<a href='javascript:void(0)' onclick="ClickCount(<%#Eval("ID") %>);" >公告</a>
这种方式弹出经常被浏览器拦截(IE9)
改为<a href='javascript:ClickCount(<%#Eval("ID") %>);' ></a>