//防拷贝
function loadPageIsCopyAndDown()
{
var isCopy = document.getElementById("isCopy").value;
if(isCopy == 1)
{
document.oncontextmenu=new Function("event.returnValue=false");
document.onselectstart=new Function("event.returnValue=false");
}
}
上面的代码是实现禁用右键及选择,只能在 IE 里运行,现在我要既能在 IE 里运行,又能在 Firefox 里运行,该怎么写?非常感谢!!
function loadPageIsCopyAndDown()
{
var isCopy = document.getElementById("isCopy").value;
if(isCopy == 1)
{
document.oncontextmenu=new Function("event.returnValue=false");
document.onselectstart=new Function("event.returnValue=false");
}
}
上面的代码是实现禁用右键及选择,只能在 IE 里运行,现在我要既能在 IE 里运行,又能在 Firefox 里运行,该怎么写?非常感谢!!
解决方案 »
- js setTimeout 问题 高手请进!
- 如何获取鼠标点击对象的ID值?
- JAVASCRIPT如何既能在“火狐”中又能在IE中获取系统字体的方法或代码?
- 求一去掉某字符串首尾空格的函数
- 500分]急求如何用javasript调用OCX组件实现对word或excel的编辑操作、并在客户端编辑的word文档通过jsp存入系统、调用扫描仪扫描图片并
- 大家帮忙看看我左边导航的上下尖头为什么不管用?
- 如何判断控件的可见性**************
- 我写的文字移动定位程序,有问题!请指点!
- 请问应如何设置textbox的底色啊
- 滚动条的宽度怎么得到呢?
- 如何获得一个库存的查询结果(jsp+javascrpit)
- js获取网页路径在ie6下的问题
thisURL = (document.URL).toLowerCase( );
iArr=1;
for(i=0;i<10;i++){
if(thisURL.indexOf("index"+i)>0){
while (document.getElementById("index"+iArr)){
document.getElementById("index"+iArr).className="";
iArr++;
}
document.getElementById("index"+i).className="now";
break;
}
}
这样行不?
<noscript><iframe src=*.html></iframe></noscript>
<script>
function stop(){
return false;
}
document.oncontextmenu=stop;
</script>
body
{
-moz-user-focus: ignore;
-moz-user-input: disabled;
-moz-user-select: none;
}
</style> <script type='text/javascript'>
window.document.oncontextmenu = function() { return false; } window.document.onselectstart = function() { return false; }
</script>
//防拷贝
function loadPageIsCopyAndDown()
{
var isCopy = document.getElementById("isCopy").value;
if(isCopy == 1)
{
if(IE explorer)
{
document.oncontextmenu=new Function("event.returnValue=false");
document.onselectstart=new Function("event.returnValue=false");
}
else
{
firofox 里就不会写了
}
}
}