码迷,mamicode.com
首页 > 编程语言 > 详细

javaScript防止拦截新窗口打开页面

时间:2017-07-12 10:28:50      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:防止   javascrip   win   lang   lan   googl   xmlns   font   function   

原文发布时间为:2009-05-04 —— 来源于本人的百度文章 [由搬家工具导入]

兼容IE.FF.GOOGLE。防止拦截。。。。

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>javaScript放拦截新窗口打开页面</title>
</head>

<body>
<a id="tagOpenWin" target="_blank"></a>  
<input   type="button"   value="防止拦截跳转测试" onclick="openwin()">
</body>
</html>

<script   language="JavaScript">  
function   openwin()  
{  
     var obj = document.getElementById("tagOpenWin");  
     obj.href   = "http://hi.baidu.com/handboy";  
     window.open(obj.href);  
}  
</script>  
</body>
</html>

javaScript防止拦截新窗口打开页面

标签:防止   javascrip   win   lang   lan   googl   xmlns   font   function   

原文地址:http://www.cnblogs.com/handboy/p/7153280.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!