Iefans,靠谱的软件下载站

首页 最新文章 最新安卓 最新苹果 浏览器 IE教程 在线图片编辑 最新软件 最新游戏

当前位置: IEfans / IE专区 / IE动态/ jQuery解决下拉框select设宽度时IE 6/7/8下option超出显示不全

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

编辑:秩名2023-06-26 16:30:01

个人做了一些自定义的修改
复制代码 代码如下:
!--[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 option
  • jQuery操作Select的Option上下移动及移除添加等等
  • JQuery中对Select的option项的添加、删除、取值
  • 删除select中所有option选项jquery代码
  • 浅析jQuery对select操作小结(遍历option,操作option)
  • JQuery操作Select的Options的Bug(IE8兼容性视图模式)
  • jquery操作select option 的代码小结
  • jQuery动态产生select option下拉列表
返回旧版Copyright © 1998-2023 www.iefans.net All Rights Reserved 沪ICP备17019769号-18 意见反馈