多重选择在IE中不起作用 [英] multiple selection is not working in IE

查看:81
本文介绍了多重选择在IE中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的以下代码

           <select id="SelectEmptyPoints" multiple="multiple">
                 <option>Point 1</option>
                 <option>Point 2</option>
                 <option>Point 3</option>
                 <option>None</option>
             </select>

onchange函数:

onchange funtion :

 function SetEmptyPoints(param) {    
 var length = param.selectedOptions.length;
}

此功能除IE以外都有效...我无法获取selectedOptions(multiple selection)的长度..如何解决.. 但是此功能适用于chrome,firefox等.....不仅适用于IE

this function working except IE... i can't get the selectedOptions(multiple selection) length.. how to resolve.. but this function is working chrome, firefox,.... it's not working only IE

推荐答案

您可以使用jquery:$("#SelectEmptyPoints").find("option:selected").length.它将在ie11上正常工作.我已经测试过.

You can use jquery:$("#SelectEmptyPoints").find("option:selected").length.It wiil work on ie11.I've tested.

这篇关于多重选择在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆