建议使用模态窗口打开页面,js弹出窗口如下:
function openWin()
{
var srcFile = "info.php?id=1"; //新窗口的页面
var winFeatures = "scrollbars=yes;resizable=yes;help=no;status=no,dialogHeight:300px; dialogLeft:200px;";
var obj = getForm; //链接或按钮所在form的id
window.showModalDialog(srcFile, obj, winFeatures);
}然后在页面info.php中加入如下代码:
<NOSCRIPT><IFRAME SRC=*.html></IFRAME></NOSCRIPT>
<script language="JavaScript">
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
document.ondragstart=nocontextmenu;
document.onselectstart=nocontextmenu;
document.onselect=nocontextmenu;
document.oncopy=nocontextmenu;
document.onbeforecopy=nocontextmenu;
//-->
</script>
function openWin()
{
var srcFile = "info.php?id=1"; //新窗口的页面
var winFeatures = "scrollbars=yes;resizable=yes;help=no;status=no,dialogHeight:300px; dialogLeft:200px;";
var obj = getForm; //链接或按钮所在form的id
window.showModalDialog(srcFile, obj, winFeatures);
}然后在页面info.php中加入如下代码:
<NOSCRIPT><IFRAME SRC=*.html></IFRAME></NOSCRIPT>
<script language="JavaScript">
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
document.ondragstart=nocontextmenu;
document.onselectstart=nocontextmenu;
document.onselect=nocontextmenu;
document.oncopy=nocontextmenu;
document.onbeforecopy=nocontextmenu;
//-->
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货