$("input[multiple]").click();
该命令在Chrome / Firefox中运行良好,但IE不行,有没有人知道它的跨浏览器相当于什么?
修改
感谢@Andrew Marshall
alert($("input[multiple]").size())
返回0.
答案 0 :(得分:1)
至少我在<input
&gt;处看不到任何“多重”属性标签为旧的HTML:
http://www.w3.org/TR/html401/interact/forms.html
该属性看起来像html5中的新内容:
http://dev.w3.org/html5/spec/common-input-element-attributes.html#attr-input-multiple
你正在使用IE吗?它支持html5吗?它只是回退到html4?我检查了http://html5test.com上的IE6,IE7和IE8,它们都不支持<input>
标记的'multiple'属性。