<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head>
<card title="解决IE6、IE7、IE8、IE9不支持HTML5 placeholder属性值的方案" id="card1">
<p> 游客</p><p>
标题:解决IE6、IE7、IE8、IE9不支持HTML5 placeholder属性值的方案<br/>
正文:<br/>
placeholder 是HTML5的新属性，在做input 的预设值还挺方便的，但无奈IE8以下不支持，因此需要额外做fix。在实际使用中，却遇到了很多问题：例如在官网查到的plugin：http://plugins.jquery.com/project/input-placeholder，就不支持type=&amp;quot;password&amp;quot;的结果。因为仅改变value，对应password的显示方式以下是我找到支持度最好地plugin:DEMO: http://mathiasbynens.be/demo/placeholderplugin: https://github.com/mathiasbynens/Placeholder-jQuery-Plugin引入：&amp;lt;!--[if lt IE 10]&amp;gt; &amp;lt;script src=&amp;quot;/libs/html5/modernizr-custom.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;script src=&amp;quot;/libs/html5/json2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;script src=&amp;quot;/libs/html5/storage.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;script src=&amp;quot;/libs/html5/jquery.placeholder.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; $(function(){    $('input, textarea').placeholder();//让所有DOM元素中，带有placeHolder=&amp;quot;...&amp;quot;的显示出来。 }); &amp;lt;/script&amp;gt;&amp;lt;![endif]--&amp;gt;;<br/><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=2163&amp;Page=1">[&lt;&lt;]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=2163&amp;Page=1">[[1]]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=2163&amp;Page=1">[&gt;&gt;]</a><br/>
<br/>
<a href="wap.asp?act=Com&amp;id=2163">查看评论(0)</a><br/>
<a href="wap.asp?act=AddCom&amp;inpId=2163">发表评论</a><br/><br/>

<br/>

<br/>
<a href="http://camnpr.com/wap.asp">首页</a>
</p>
</card>
</wml>