jQuery解决下拉框select设宽度时IE 6/7/8下option超出显示不全

jQuery解决下拉框select设宽度时IE 6/7/8下option超出显示不全
个人做了一些自定义的修改
复制代码 代码如下:
!--[if lt IE 9]
script type="text/javascript"
jQuery(function($){
var el;

$("select").each(function() {
el = $(this);
el.data("origWidth", el.css("width"));
// el.data("oriWidth",85);
})
.focusin(function(){
el=$(this);
el.css("width", "auto");

//if(el.width() el.data("oriWidth")){
// el.css("width", el.data("origWidth"));
//}

})
.bind("blur change ", function(){
el = $(this);
el.css("width", el.data("origWidth"));
});
});
/script
![endif]--
您可能感兴趣的文章:jQuery获取select选中的option的value值实现方法JQuery动态添加Select的Option元素实现方法JS & JQuery 动态添加 select optionjQuery操作Select的Option上下移动及移除添加等等JQuery中对Select的option项的添加、删除、取值删除select中所有option选项jquery代码浅析jQuery对select操作小结(遍历option,操作option)JQuery操作Select的Options的Bug(IE8兼容性视图模式)jquery操作select option 的代码小结jQuery动态产生select option下拉列表

推荐阅读