IE in the placeholder attribute is not supported, JS solution:
//Placeholder property is compatible under IEfunction placeholder (pEle, con) {varPEle =PEleif(Pele.find ("Input,textarea"). val () = ="") {pele.append ("<i class= ' Placeholder_ie ' >"+con+"</i>"); } pele.click (function () {$ ( This). Find (". Placeholder_ie"). CSS ("Display","None"); $( This). Find ("Input,textarea"). focus (); }) Pele.find ("Input,textarea"). blur (function () {if(Pele.find ("Input,textarea"). val () = ="") {Pele.find (". Placeholder_ie"). CSS ("Display","Inline-block"); } }) } //IE Browser if(Navigator.appname = ="Microsoft Internet Explorer") {placeholder ($ (". Header_box. Serach_content"). EQ (0) ,"search ..." ); Placeholder ($ (". news_product. Search_website>p"). EQ (0) ,"Shenzhen" ); }
Css:
/*input box ie under Placeholder style*/. Placeholder_ie{Display:Inline-block;width:100%;Height:26px;position:Absolute; Left:-42px;Top:0;Line-height:26px;font-size:14px;padding:0 10px;Color:#989898;}
IE in the placeholder attribute is not supported, JS solution