js skills collection (more than 200) highly recommended_basic knowledge
PHP中文网Original
2016-05-16 19:19:431422browse
1. Text box focus problem onBlur: This event is generated when the input focus is lost onFocus: This file is generated when the input gains focus
Onchange: When the text value changes, this event is generated Onselect: When the text is highlighted, this event is generated
The text disappears when clicked and reappears when the focus is lost
2. Special colors for web buttons
style="background-color:rgb(235,207,22)">
3. The color changes when the mouse moves in and out
22. Go to target URL
window.location="http://guoguo"
23. Pass the form of the object
UpdateSN('guoqiang99267',this.form) function UpdateSN(strValue,strForm)
{ strForm.SignInName.value = strValue; return false; }
24. Text label
25.layer2 is the ID of the component, which can control whether the component is visible
document.all.item('Layer2').style.display = "block";
document.all.item('Layer2').style.display = "none";//
26. Add the page to favorites //
27. Automatically close the page after 10 seconds < script language="JavaScript" >
function closeit() { setTimeout("self.close()", 10000) }
< /script >
28. You can compare the size of characters char=post.charAt(i);
if(!('0'<=char&&char<='9'))
29. Convert characters to numbers
month = parseInt(char)
30. When clicking on an option with a non-empty value, redirect to the specified connection
31. Change the background color
onmouseout="this.bgColor='#FAFBFC';">
32. Change the background color of the text input box
33. Change the characteristics of the horizontal line