打开新窗口链接的几种办法

来源:互联网 发布:历史类书籍 知乎 编辑:程序博客网 时间:2024/05/01 09:11
转自:http://www.cnblogs.com/xiang/archive/2006/09/05/495828.html
打开新窗口链接的几种办法


1.window.open('url')

2.用自定义函数
        <script>
        
function openWin(tag,obj)
        
{
            obj.target
="_blank";
            obj.href 
= "Web/Substation/Substation.aspx?stationno="+tag;
            obj.click();
        }

        
</script>
< href="javascript:void(0)" onclick="openWin(3,this)">株洲</a>

window.location.href="" 
原创粉丝点击