jquery input 选择器

1.9.1 官方文档:

创建一个 <input> 元素必须同时设定 type 属性。因为微软规定 <input> 元素的 type 只能写一次。

jQuery 代码:
// 在 IE 中无效:
$("<input>").attr("type", "checkbox");
// 在 IE 中有效:
$("<input type='checkbox'>");

 

 
posted @ 2014-07-21 22:00  Mr_Clint  阅读(440)  评论(0编辑  收藏  举报