各种打开新页面

//服务器端 在整个页面的打开新窗口
window.parent.parent.location.href = '../login.aspx';
//在另一个框架打开新页面
window.parent.mainFrame.location.href = 'NewsManage.aspx?type=0';

//几秒后自动跳转页面
<meta http-equiv="Refresh" content="5;URL=http://XXX" />

//frameset框架  利用target打开
window.open('test.htm', 'mainFrame');


1. window.location 法,代码如下

<body οnlοad="window.location='http://xxxxx';"></body>

2. 框架法,代码如下

<frameset cols="100%,*">
<frame src="http://xxxxx" scrolling="auto">
</frameset>

其中scrolling参数值得注意,合理使用可加强隐蔽性。Cols参数可根据自己的实际情况作更改。

3. META标志法,代码如下

<META HTTP-EQUIV="Refresh" CONTENT="0;URL= http://xxxxx">

其中CONTENT后面的阿拉伯数字是代表过几秒中钟转入目标网页。

4. iframe内帧法

<iframe src="http://xxxxx" width="0" height="0" frameborder="0">
5.
在window.open()函数中增加一个参数,将target设置为‘self’,
即改为使用: window.open('link','_blank'); 等同window.location.href="link"
6.
<a   href= "# "   οnclick= "window.showModalDialog( 'link') "> 点击 </a>
7.
function   replyMessage(id)
            {
                var   win = window.open('Reply.aspx?originMessage= '+id,'_blank');
                if   (win == null)
                    window.alert( "请不要启用弹出式窗口拦截 " );
            }
8.
window._open=window.open;
window.open=function(sURL,sName,sFeatures,bReplace){
if(sName==undefined){sName="_blank"};
if(sFeatures==undefined){sFeatures=""};
if(bReplace==undefined){bReplace=false};
var win=window._open(sURL,sName,sFeatures,bReplace);
if(!win){
    alert('天啦!你的机器上竟然有软件拦截弹出窗口耶,好讨厌哦,人家不来了啦!快去掉嘛~~555~');
    return false;
}
return true;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值