jquery 表单元素每一个元素都有自己刷新的方法,每当改变它们的属性以后,都要执行这些方法,以下是实例:
复选按钮
$("input[type=‘checkbox‘]").attr("checked",true).checkboxradio("refresh");
单选按钮组:
$("input[type=‘radio‘]").attr("checked",true).checkboxradio("refresh");
选择列表::
var myselect = $("select#foo"); myselect[0].selectedIndex = 3; myselect.selectmenu("refresh");
滑动条
$("input[type=range]").val(60).slider("refresh");
开关 (they use slider):
var myswitch = $("select#bar"); myswitch[0].selectedIndex = 1; myswitch .slider("refresh");