This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11255|Reply: 0

[HTML/HTML5] placeholder attribute in HTML5

[Copy link]
Posted on 2/2/2015 9:46:25 AM | | |
HTML5 introduces many interesting new features; Some are in HTML, some are JavaScript APIs, all very useful. One of my favorite features is the placeholder property in the INPUT. The placeholder attribute allows you to display a prompt in a text box, which is hidden once you enter something in the text box. You've probably seen this effect countless times before, but most of it was implemented in JavaScript, and now HTML5 provides native support and works even better!


[mw_shl_code=html,true] <input type="text" name="first_name" placeholder="Your name..." />[/mw_shl_code]




Previous:html dl dt dd tag element syntax structure and usage
Next:Open the link when you click the Input button
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com