In the address bar, enter:
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 % 20 images! ')}
View the source code of the new page.
To display the information:
Javascript: funcname = ''; for % 20 (var1 = 0; var1 <document. images. length; var1 ++) {funcname + = '/N' +' <br>'}; If (funcname! = '') {Document. write ('<center>' + funcname + '</center>'); void (document. close ()} else {alert ('no % 20 images! ')}
Show and add Link
Javascript: funcname = ''; for % 20 (var1 = 0; var1 <document. images. length; var1 ++) {funcname + = '/N' +' <a % 20 href = '+ document. images [var1]. SRC + '> </a> <br>'}; If (funcname! = '') {Document. write ('<center>' + funcname + '</center>'); void (document. close ()} else {alert ('no % 20 images! ')}
Common forbidden right-click code
<Script language = "JavaScript">
Function click (){
If (event. Button = 1) {// change to button = 2 it is best to add a right-click if it is not allowed | button = 3 prevent being cracked, for example, code 3
Alert ('Sorry, this function is forbidden .')
}
}
Document. onmousedown = click
</SCRIPT>
Code 2
<SCRIPT>
Document. oncontextmenu = new function ("Return false ;")
</SCRIPT>
Code 3
<Script language = "JavaScript">
Function click (e ){
If (document. All ){
If (event. Button = 2 | event. Button = 3 ){
Oncontextmenu = 'Return false ';
}
}
If (document. layers) {// under NNS
If (E. Which = 3 ){
Oncontextmenu = 'Return false ';
}
}
}
If (document. layers ){
Document. captureevents (event. mousedown );
}
Document. onmousedown = click;
Document. oncontextmenu = new function ("Return false ;")
</SCRIPT>
Code 4
<Body oncontextmenu = "Return false" ondragstart = "Return false"
Onselectstart = "Return false" onselect = "document. selection. Empty ()"
Oncopy = "document. selection. Empty ()" onbeforecopy = "Return false"
Onmouseup = "document. selection. Empty ()">
Original article link: http://hi.baidu.com/sunsee/blog/item/9ef5774eff1d0c0bb3de058d.html