表单对象属性过滤选择器

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <!--

表单对象属性过滤选择器:通过表单中的某对象属性特征获取该类元素,如enabled、disabled、checked、selected属性


jQuery选择器详解

根据所获取页面中元素的不同,可以将jQuery选择器分为:基本选择器、层次选择器、过滤选择器、表单选择器四大类。其中,在过滤选择器中有可以分为:简单过滤选择器、内容过滤选择器、可见性过滤选择器、属性过滤选择器、子元素过滤选择器、表单对象属性过滤选择器6种
-->
    <title> 通过表单对象属性过滤选择器获取表单对象</title>
 
    <script src="jquery-1.9.1.js" type="text/javascript"></script>


    <style type="text/css">
        #Select1
        {
            width: 144px;
        }
        #TextArea1
        {
            height: 124px;
            width: 250px;
        }
        .div
        {
            border: solid 1px #eee;
            background-color: Aqua;
        }
    </style>
    <script src="jquery-1.9.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            //$('#form1 div').html($('#form1 :input').length);
            //$('#form1 :password').css('background-color','red');
            //$('#form1 :text').css('display','none');
            //$('#form1 :input').css('display', 'none');
            //$('#form1 :radio').css('display', 'none');
            //$('#form1 :checkbox').css('display', 'none');
            //$('#form1 :submit').css('display','none');
            //$('#form1 :reset').css('display', 'none');
            //$('#form1 :image').css('display', 'none');
            //$('#form1 :file').css('display', 'none');
        })
    </script>
</head>
<body>
    <form id="form1">
    <h1>
        注册用户</h1>
    <p>
        用户名<input id="Text1" type="text" /></p>
    <p>
        密码<input id="Password1" type="password" /></p>
    <p>
        技术<select id="Select1" name="D1" multiple="multiple">
            <option value="0">javascript</option>
            <option value="1">sql server</option>
            <option value="2">c#</option>
        </select></p>
    <p>
        学历:<input id="Radio1" checked="checked" name="R1" type="radio" value="V1" />大专<input
            id="Radio2" checked="checked" name="R1" type="radio" value="V1" />本科<input id="Radio3"
                checked="checked" name="R1" type="radio" value="V1" />研究生</p>
    <p>
        爱好:<input id="Checkbox1" type="checkbox" />爬山<input id="Checkbox2" type="checkbox" />游泳<input
            id="Checkbox3" type="checkbox" />踢球<input id="Checkbox4" type="checkbox" />玩</p>
    <p>
        验证码:<input type="image" src="images/1.jpg" style="width:60px;height:20px;"/></p>
        <p>
            个人简介:</p>
        <p>
            <textarea id="TextArea1" name="S1" rows="3" cols=""></textarea></p>
        <p>
            上传头像:<input id="File1" type="file" /><input id="Button1" type="button" value="上传" /></p>
        <p>
            <input id="Submit1" type="submit" value="注册" /><input id="Reset1" type="reset" value="重置" /></p>
        <div id="divShow">
        </div>
    </form>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值