1. Text Box Focus Issues
OnBlur: This event occurs when the input focus is lost onfocus: When the input has the focus, the file is Onchange: When the literal value changes, the event is generated Onselect: When the text is highlighted, the file is generated
<input type= "text" value= "Guo Qiang" onfocus= "if (value== ' Guo Qiang ') {value= '}" onblur= "if (value== ') {value= ' Guo Qiang '}" > Text disappears when clicked , the text appears again when you lose focus
2. Special colors for Web buttons
<input Type=button name= "Submit1" value= "Guo Qiang" size=10 class=s02
Style= "
3. Color changes when mouse moves in and out
<input type= "Submit" value= "Find" name= "B1" onmouseout=this.style.color= "Blue"
Onmouseover=this.style.color= "Red" class= "button" >
4. Flat button
<input type=submit value= Subscription style= "border:1px Solid: #666666; height:17px; width:25pt; font-size:9pt;
#E8E8FF; Color: #666666 "name=" Submit ">
5. Button color change
<input type=text name= "Nick" style= "border:1px solid #666666; font-size:9pt; height:17px;
#F4F4FF; Color: #ff6600 "size=" > "maxlength="
6. Flat input Box
<input type= "text" name= "T1" size= "style=" border-style:solid; Border-width:1 ">
7. Turn the window into a specified size <script>
Window.resizeto (300,283); </script>
8. Scroll the text up and down <marquee direction=up scrollamount=1 scrolldelay=100 onmouseover= ' this.stop () '
Height=60>
<!--head_scrolltext--<tr> <td> Republic
</table> <!--end Head_scrolltext--</marquee>
9. Status bar Displays the page status
<base onmouseover= "window.status=" website construction http://www.webmake.cn/' return true ' >
10. You can click the text to achieve the selection of radio options <br>
<input type= "Radio" name= "Regtype" value= "A03" id= "A03" > <label for = "A03" > Couple: Register two accounts at a time </label> <br>
11. You can write the onclick event in the font of the text field
12. Print </a> Print web pages
<a href= ' javascript:window.print () ' >
13. Line Input Box
<input type= "text" name= "key" size= "" value= "keyword" onfocus=this.select () Onmouseover=this.focus ()
class= "line" >
14. Display document last Modified date <script language=javascript> function hi (str) {
document.write (document.lastmodified)
Alert ("HI" +str+ "!")}
</script>
javascript-Classic Examples