//防拷贝
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 里运行,该怎么写?非常感谢!!
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 里就不会写了
}
}
}