html select 不可選 jquery
$.fn.selectReadOnly=function(){
var tem=$(this).children('option').index($("option:selected"));
$(this).change(function(){
$(this).children('option').eq(tem).attr("selected",true);
});
}
$("select:[readonly='readonly']").selectReadOnly();
var tem=$(this).children('option').index($("option:selected"));
$(this).change(function(){
$(this).children('option').eq(tem).attr("selected",true);
});
}
$("select:[readonly='readonly']").selectReadOnly();
posted on 2011-08-23 21:24 void 閱讀(2703) 評論(1) 編輯 收藏 所屬分類: Jquery