Copy codeThe Code is as follows: <SPAN style = "FONT-SIZE: 18px"> the Form class loses focus </SPAN>
Copy codeThe Code is as follows: <script type = "text/javascript">
$ (Function (){
$ (": Input"). focus (function () {// you can obtain various forms, such as (text/: button)
$ (This). addClass ("focusa ");
If ($ (this). val () = this. defaultValue ){
$ (This). val ("");
}
}). Blur (function (){
$ (This). removeClass ("focusa ");
If ($ (this). val () = ""){
$ (This). val (this. defaultValue );
}
});
});
</Script>
Types of various forms:Copy codeThe Code is as follows: <input type = "text"/> text box
<Input type = "password"/> password box
<Input type = "submit"/> submit button
<Input type = "reset"/> reset button
<Input type = "radio"/> single worker
<Input type = "checkbox"/> check box
<Input type = "button"/> normal button
<Input type = "file"/> file selection Control
<Input type = "hidden"/> hide box
<Input type = "image"/> image button