Small problem Summary: the mouse clicks into the input box, the input box prompts disappear, the mouse moves away, the input box prompt appears

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.