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设宽度时IE 6/7/8下option超出显示不全
select下拉列表框中超链接跳转的代码一例
Jquery多选下拉列表插件jquery multiselect功能介绍及使用
Jquery获取Select下拉框中Text与Value的方法详解
CSS3 等宽字体与ch单位的详解
jQuery获取Select中Text与Value值
jQuery操作下拉框与文本框
JavaScript图片放大效果
jQuery select操作方法总结
jquery 操作input标签方法大全