| ◆Add to favorites | |
| illustrate | Click to add your website to the favorites menu in your browser |
| Code | <span style=CURSOR: hand onClick=window.external.addFavorite('https://www.VeVb.com','Wulin.com') title=Wulin.com>Save this site</span> |
| ◆Set as homepage | |
| illustrate | Click to set your website as the start page of your browser |
| Code | <span onclick=var strHref=window.location.href;this.style.behavior='url(#default#homepage)'; this.setHomePage('https://www.VeVb.com'); style=CURSOR: hand>Set as homepage</span> |
| ◆Remove the underline of the hyperlink | |
| illustrate | Sometimes it’s annoying to look at the underscore of the hyperlink. Put the following code between the web page source code <head> and </head>, and the underscore will be gone! Note that there can no longer be any attributes such as link in the <body> tag of the web page, otherwise this effect will be invalid! |
| Code | <style TYPE=text/css> <!-- A:link{text-decoration:none} A: visited{text-decoration:none} A:hover {color: #ff00ff;text-decoration:underline} --> </style> |
| ◆Automatically refresh the web page | |
| illustrate | Automatically refresh the web page Add the following code between HTML, and the page you are browsing will automatically change to the target.html page after 5 minutes. 300 in the code is the refresh delay time, in seconds. target.html is the target page you want to turn to. If it is this page, it will automatically refresh this page. |
| Code | <meta http-equiv=refresh content=300; url=target.html> |
| ◆Refresh this page | |
| illustrate | Click to refresh this page. |
| Code | <a href=javascript:location.reload() target=_self>Refresh</a> |
| ◆Return to the previous page | |
| illustrate | Click to return to the previous page. |
| Code | <a href=javascript:history.back(-1)>Return to previous page</a> |
| ◆Breaking out of the small window | |
| illustrate | When opening a page with the following code, a small window of 468x60 size will pop up. window.html is the web page to be displayed in the small window that pops up. toolbar, status, menubar, scrollbars, toolbar, status bar, menubar and scrollbar of the small window, whether the resizable setting allows the viewer to change the size of the small window, width and height set the width and height of the small window. (However, such small windows are generally unpopular!) |
| Code | <script language=JavaScript> window.open(window.html,www_helpor_net,toolbar=no, status=no,menubar=no, scrollbars=no,resizable=no,width=468,height=60,left=200,top=50); </script> |
| ◆Automatically close the window | |
| illustrate | Add the following code to the web page source code, and the window will automatically close after 20 seconds! This is best when used with a jump-out window! In the code, i=20 means that the closing delay time is 20 seconds and can be modified at will. |
| Code | <script language=javascript> <!-- function clock(){i=i-1 document.title=This window will automatically close after +i+ seconds!; if(i>0)setTimeout(clock();,1000); else self.close();} var i=20 clock(); //--> </script> |
| ◆Protect the page | |
| illustrate | If you don't want the things you have worked hard to make are easily copied and Paste, you might as well add the following code to HTML. When right-clicking the mouse on the web page, what appears is not the shortcut menu you want but a warning window. /n/n means a newline. |
| Code | <script language=JavaScript> function help() { if (event.button==2)alert('For browsing only! Thank you!/n/nIf you have any questions, please contact me! ') } </script> Then change <body> to <body onmousedown=helpor_net()> |
| ◆Fixed font size | |
| illustrate | Have you ever had this experience: a well-arranged web page, when browsing, the font size of the browser is large or small, and a beautiful web page is beyond recognition. Because the size of the characters changes, the layout is naturally messy. Now, just add the following code between <head> and </head> of the web page source file (invalid for text defined with <font> tag). |
| Code | <style type=text/css> <!-- body {font-size:9pt} td {font-size:9pt} --> </style> |
| ◆Dynamic welcome in the status bar | |
| illustrate | A welcome message running to the left appears in the status bar of the browser! |
| Code | <script language=JavaScript> <!-- function statusMessageObject(p,d) { this.msg = MESSAGE this.out = this.pos = POSITION this.delay = DELAY this.i = 0 this.reset = clearMessage } function clearMessage() { this.pos = POSITION } var POSITION = 100 var DELAY = 5 var MESSAGE = Welcome! Welcome to WWW.VeVb.com var scroll = new statusMessageObject() function scroller() { for (scroll.i = 0; scroll.i < scroll.pos; scroll.i++) { scroll.out += } if (scroll.pos >= 0) scroll.out += scroll.msg else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length) window.status = scroll.out scroll.out = scroll.pos-- if (scroll.pos < -(scroll.msg.length)) { scroll.reset() } setTimeout ('scroller()',scroll.delay) } function snapIn(jumpSpaces,position) { var msg = scroll.msg var out = for (var i=0; i<position; i++) {out += msg.charAt(i)} for (i=1;i<jumpSpaces;i++) {out += } out += msg.charAt(position) window.status = out if (jumpSpaces <= 1) { position++ if (msg.charAt(position) == ' ') {position++ } jumpSpaces = 100-position } else if (jumpSpaces > 3) {jumpSpaces *= .75} else {jumpSpaces--} if (position != msg.length) { var cmd = snapIn( + jumpSpaces + , + position + ); scrollID = window.setTimeout(cmd, scroll.delay); } else { window.status= jumpSpaces=0 position=0 cmd = snapIn( + jumpSpaces + , + position + ); scrollID = window.setTimeout(cmd, scroll.delay); return false } return true } snapIn(100,0); // --> </script> |
| ◆Protect your page from being placed in the frame by others | |
| illustrate | Some people are too lazy to be able to put the web pages made by others into the frame (Frame) of their own web pages, and the results of others become their own, and the real address of the web page cannot be seen! To prevent your results from being plagiarized by these people, you can add the following code to the HTML of your web page, so that your web page will always open in the entire window. |
| Code | <Script LANGUAGE=JavaScript> if(self!=top){top.location=self.location;} </script> |