各种选择框jQuery的选中方法(实例讲解)

seeyoull84308 15 0 PDF 2020-12-13 07:12:31

select下拉列表的选中方法是:$(“slect option:eq(1)”).attr(“selected”,true);//选中第二个option chekbox的选中方法:$(“[value=check1”]:checkbox).attr(“checked”,true); radio的选中方法:$(“[value=radio2”]:radio).attr(“checked”,true); 以上是简写,重要的是看代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.o

用户评论
请输入评论内容
评分:
暂无评论