html select radio -- 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 val=$('input:radio[name="sex"]:checked').val();
var tem=$(this).children('option').index($("option:selected"));
$(this).change(function(){
$(this).children('option').eq(tem).attr("selected",true);
});
}
$("select:[readonly='readonly']").selectReadOnly();
//var val=$('input:radio[name="sex"]:checked').val();
posted on 2011-11-15 14:43 Steven_bot 閱讀(253) 評論(0) 編輯 收藏 所屬分類: 遇到的一些問題