接將一下代碼引用到頁面 </body> 以前javascript
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script> <!-- 其它js引用.... --> <!--[if lt IE 9]> <!-- 用於爲 IE6-8 不支持的HTML5標籤,實現原理: 經過document.createElement方法建立abbr,adide等html5標籤,並添加樣式實現 --> <script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script> <!--用於爲 IE6-8 以及其它不支持 CSS3 Media Queries 的瀏覽器提供媒體查詢的 min-width 和 max-width 特性,實現響應式網頁設計--> <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.js"></script> <!--用於爲 IE6-8 不支持的HTML5標籤的placeholder屬性 begin--> <script src="//cdn.bootcss.com/jquery-placeholder/2.0.8/jquery.placeholder.min.js"></script> <script type="text/javascript"> $(function () { $('input, textarea').placeholder(); }); </script> <!--用於爲 IE6-8 不支持的HTML5標籤的placeholder屬性 end--> <![endif]-->