在地址栏输入:
javascript:str='';for%20(var1=0;var1<document.images.length;var1++){str+='/n'+document.images[var1].src};if(str!=''){document.write(str);void(document.close())}else{alert('No%20images!')}
然后查看新出来的页面的源代码
若要显示出来,则:
javascript:funcname='';for%20(var1=0;var1<document.images.length;var1++){funcname+='/n'+'<img%20src='+document.images[var1].src+'><br>'};if(funcname!=''){document.write('<center>'+funcname+'</center>');void(document.close())}else{alert('No%20images!')}
显示并加上链接
javascript:funcname='';for%20(var1=0;var1<document.images.length;var1++){funcname+='/n'+'<a%20href='+document.images[var1].src+'><img%20src='+document.images[var1].src+'></a><br>'};if(funcname!=''){document.write('<center>'+funcname+'</center>');void(document.close())}else{alert('No%20images!')}
<script language="javascript">
function click() {
if (event.button==1) { //改成button==2为禁止右键最好再加||button==3防止被破解如代码3
alert('对不起,禁止使用此功能.')
}
}
document.οnmοusedοwn=click
</script>
代码2
<SCRIPT>
document.oncontextmenu = new Function("return false;")
</script>
代码3
<script language="JavaScript">
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
οncοntextmenu='return false';
}
}
if (document.layers) {//NNS下的
if (e.which == 3) {
οncοntextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.οnmοusedοwn=click;
document.oncontextmenu = new Function("return false;")
</script>
代码4
<body οncοntextmenu="return false" οndragstart="return false" onselectstart ="return false" οnselect="document.selection.empty()" οncοpy="document.selection.empty()" onbeforecopy="return false" οnmοuseup="document.selection.empty()">
原文链接地址:http://hi.baidu.com/sunsee/blog/item/9ef5774eff1d0c0bb3de058d.html