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>

 

posted @ 2011-09-23 12:25  走路到纽约  阅读(490)  评论(0编辑  收藏  举报