Get all links on the webpage:
Javascript: A = document. getelementsbytagname ("A"); newwindow = Window. open ("newwindow" contains invalid newclientdoc ument. open (); for (I = 0; I <a.length? I =##new=doc ument. write ("<a href = '" +. item (I ). href + "'>" +. item (I ). href + "</a> <br>" zookeeper has newclientdoc ument. close (); void (0)
Others:
Javascript: Alert ("Hello, world! ")
Javascript: a = 1; B = 2; C = 3; alert (a + B * C)
Javascript: TDS = document. getelementsbytagname ('td '); for (I = 0; I <TDs. length; I ++) {TDs. item (I ). style. backgroundcolor = "red ";
Javascript: Document. getelementsbytagname ('A'). Item (2). style. color = "green"; void (0)
Javascript: TDS = document. getelementsbytagname ('td '); for (I = 0; I <TDs. length; I ++) {TDs. item (I ). style. backgroundcolor = "red";} void (0)
Javascript: Alert (document. lastmodified)
Javascript: Document. Body. style. backgroundcolor = "red"; void (0 );
Javascript: var a = document. getElementsByTagName ('A'); for (I = 0; I <. length; I ++) a [I]. innerHTML = 'wang Ke'; void (0 );
Javascript: document. onmousedown = function () {}; void (0); // onselectstart
Javascript: document. onselectstart = function () {}; void (0 );
Reference: http://blog.csdn.net/zhengyuanting/archive/2008/07/18/2669098.aspx
<Script language = javascript>
Function click (){
Alert ("prohibit your left-click Copy! ")
}
Function click1 (){
If (event. button = 2 ){
Alert ("right-click prohibited ~! ")
}
}
Function CtrlKeyDown (){
If (event. ctrlKey ){
Alert ("improper copying will damage your system! ")
}
}
Document. onkeydown = CtrlKeyDown;
Document. onselectstart = click;
Document. onmousedown = click1;
</SCRIPT>