IE10 or earlier versions perfectly support the placeholder feature, ie10placeholder
Directly add the code and introduce Jquery.
$ (Function () {// the browser does not support placeholder before executing if (! ('Holder' in document. createElement ('input') {$ ('[placeholder]'). each (function () {var $ tag = $ (this); // The current input var $ copy = $ tag. clone (); // copy the current input into copy.css ("color", "#999"); $ copy. val ($ copy. attr ('holder'); $ copy. focus (function () {if (this. value = $ copy. attr ('holder') {this. value = ''; this. style. color = '# 000' ;}}); $ copy. blur (function () {if (this. value = "") {this. value = $ copy. attr ('holder'); $ tag. val (""); this. style. color = '#999';} else {$ tag. val (this. value) ;}}); $ tag. hide (). after ($ copy. show (); // hide the current input, with the placeholder function js input display });}});