jQuery获取选中内容及设置元素属性的方法

时间:2014-07-09    点击:68   

获取选中select :

$("#id option:selected").val();

自定义radio:

$("input[name=sex][value="+data.sex+"]").attr("checked",true);

获取radio:

$("input[name='sex']:checked").val()

设置input不能编辑:

$("#cashNum").attr("disabled","disabled");

常用jQuery选择器总结
js动态改变select选择变更option的index值示例
javascript event在FF和IE的兼容传参心得(绝对好用)
JQuery1.8 判断元素是否绑定事件的方法
借助JavaScript脚本判断浏览器Flash Player信息的方法
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved