万普插件库

jQuery插件大全与特效教程

jquery 表单常用方法解析(jquery中表单的对象属性)

input选择NAME参数

$("input[name='optionsRadios']").prop("checked",false);

赋值

$("input[name='radioName'][value=2]")

1、$("form :input") 返回form中的所有表单对象,包括textarea、select、button等.

2、 $("form input")返回form中的所有input标签对象.

要想获取某个radio的值有以下的几种方法,直接给出代码:

1.$('input[name="testradio"]:checked').val();2、

1.$('input:radio:checked').val();3、

1.$('input[@name="testradio"][checked]');4、

1.$('input[name="testradio"]').filter(':checked');差不多挺全的了,如果我们要遍历name为testradio的所有radio呢,代码如下

1.$('input[name="testradio"]').each(function(){2.alert(this.value);3.});如果要取具体某个radio的值,比如第二个radio的值,这样写

1.$('input[name="testradio"]:eq(1)').val()

下拉框选择项的value值 $("select").find("option:selected").val();

下拉框选择项的text值 $("select").find("option:selected").text();

jquery select通过value找text

$("#orderstate option[value=" + cellvalue + "]").text();

判断选中

$("#orderstate‘).is(":checked")

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言