Questions such as title:
When the mouse clicks into the input box, the prompt of the input box disappears, the mouse moves away, and the input box prompt appears. :
The procedure is as follows:
<input type= "text" name= "name" id= "name" class= "Ind_cont_input Ind_cont_inputioce1" onfocus= "if (value = =" Please enter 2-5 Chinese name ') {value = '} ' onblur= ' if (value = = ') {value= ' Please enter 2-5 Chinese name '} ' value= "Please enter 2-5 Chinese name" >
<input type= "Text" name= "Tel" id= "tel" class= "ind_cont_input ind_cont_inputioce2 ind_cont_inputboder1" value= " Please enter your phone "onfocus=" if (value = = ' Please enter your phone ') {value = '} ' onblur= ' if (value = = ') {value= ' Please enter your phone '} ' >
Note that the point is the onblur and onfocus property of input. There are also simple if judgments. Very convenient and very practical.
The demo address is: http://www.ya-jing.cn
Small problem Summary: the mouse clicks into the input box, the input box prompts disappear, the mouse moves away, the input box prompt appears