This post mainly collects various introductory codes
Hiding and displaying layers
Just set the display property of style
For example, <div style="display:none" >hidden layer</div>
If you want to display it, you can control it through a script
("MyDiv"). = "";
Prohibit right-clicking
<body oncontextmenu="return false">
Error message of program running in blocked page
= function()
{
return true;
}
Get the resolution of the current monitor
Get the width of the screen
Get the height of the screen
If the current resolution is 800*600, it is 800, it is 600
Run specific codes regularly
setTimeout(Code,Timeout);
setInterval(Code,Timeout);
Code is a string with js code inside, Timeout is the time interval, the unit is microseconds
setTimeout is to run the code after counting how many microseconds to now (only run once)
setInterval is to run the code every few microseconds
Get the URL of this page
var Url = ;
Save the content of the current page
("SaveAs","","C:\\");
Hiding and displaying layers
Just set the display property of style
For example, <div style="display:none" >hidden layer</div>
If you want to display it, you can control it through a script
("MyDiv"). = "";
Prohibit right-clicking
<body oncontextmenu="return false">
Error message of program running in blocked page
= function()
{
return true;
}
Get the resolution of the current monitor
Get the width of the screen
Get the height of the screen
If the current resolution is 800*600, it is 800, it is 600
Run specific codes regularly
setTimeout(Code,Timeout);
setInterval(Code,Timeout);
Code is a string with js code inside, Timeout is the time interval, the unit is microseconds
setTimeout is to run the code after counting how many microseconds to now (only run once)
setInterval is to run the code every few microseconds
Get the URL of this page
var Url = ;
Save the content of the current page
("SaveAs","","C:\\");
Hidden the toolbar in the browser when the mouse moves to the image that pops up
<img galleryimg="no">
or
<head>
<meta http-equiv="imagetoolbar" content="no">
</head>
Open, save as, attributes, print ", etc. 14 JS codes
<img galleryimg="no">
or
<head>
<meta http-equiv="imagetoolbar" content="no">
</head>
Open, save as, attributes, print ", etc. 14 JS codes
■Open ■
<input name=Button onClick=(1,1) type=button value=Open>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Save as ■
<input name=Button onClick=(4,1) type=button value=Save as ><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Properties■
<input name=Button onClick=(10,1) type=button value=property><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Print■
<input name=Button onClick=(6,1) type=button value=print><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Page settings■
<input name=Button onClick=(8,1) type=button value=page settings><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Refresh■
<input type=button value=refresh name=refresh onclick="()">
■Import to favorites■
<input type="button" name="Button" value="Import favorites" onClick=(true,);>
■Export Collection■
<input type="button" name="Button3" value="Export favorites" onClick=(false,);>
■Add to Favorites■
<INPUT name=Button2 onclick="(, )" type=button value=Add to favorites>
■ Organize favorites■
<INPUT name=Submit2 onclick="(OrganizeFavorites, null)" type=button value=organize favorites>
■View original file■
<INPUT name=Button onclick= = "view-source:" + type=button value=View source file>
■Language settings■
<INPUT name=Button onclick="(LanguageDialog, null)" type=button value=Language settings>
■Forward■
<INPUT name=Submit onclick=(1) type=submit value=Forward>
■Back■
<INPUT name=Submit2 onclick=(-1) type=submit value=back>
<input name=Button onClick=(1,1) type=button value=Open>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Save as ■
<input name=Button onClick=(4,1) type=button value=Save as ><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Properties■
<input name=Button onClick=(10,1) type=button value=property><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Print■
<input name=Button onClick=(6,1) type=button value=print><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Page settings■
<input name=Button onClick=(8,1) type=button value=page settings><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■Refresh■
<input type=button value=refresh name=refresh onclick="()">
■Import to favorites■
<input type="button" name="Button" value="Import favorites" onClick=(true,);>
■Export Collection■
<input type="button" name="Button3" value="Export favorites" onClick=(false,);>
■Add to Favorites■
<INPUT name=Button2 onclick="(, )" type=button value=Add to favorites>
■ Organize favorites■
<INPUT name=Submit2 onclick="(OrganizeFavorites, null)" type=button value=organize favorites>
■View original file■
<INPUT name=Button onclick= = "view-source:" + type=button value=View source file>
■Language settings■
<INPUT name=Button onclick="(LanguageDialog, null)" type=button value=Language settings>
■Forward■
<INPUT name=Submit onclick=(1) type=submit value=Forward>
■Back■
<INPUT name=Submit2 onclick=(-1) type=submit value=back>