Placeholder does not support IE8

Source: Internet
Author: User

Function placeholder (EL) {function isplaceholder () {var textarea = document. createelement ("textarea"); Return "Placeholder" in textarea;} debugger; var $ El = $ (EL ); // If (isplaceholder () = false &&! ('Holder' in document. createelement ('textarea ') {$ ('textarea [placeholder]'). each (function () {var that = $ (this); text = That. ATTR ('holder'); If (that. val () = "") {That. val (text ). addclass ('placeholder ');} // After the cursor focus is obtained, the content in the input box is cleared that. focus (function () {if(cancel.html () = text) {cancel.html ("");} If (that. val () = text) {That. val (""). removeclass ('holder ');}}). blur (function () {// when the cursor focus leaves the input box, add the prompt content if (that. val () = "") {That. val (text ). addclass ('placeholder ') ;}}) }}</script/>

-->

Placeholder does not support IE8

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.