(023)jquery_表单选择器password

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
  <head>
    <title>form_password.html</title>
    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <style type="text/css">
        .bg_blue
        {
            background-color: pink;
        }
    </style>
    <script type="text/javascript" src="../js/jquery/jquery190.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("#frmTest :password").addClass("bg_blue");
        });
    </script>
  </head>
  
  <body>
           <h3>修改多个密码输入框元素的背景色</h3>
        <form id="frmTest" action="#">
            <input type="text" id="Text1" value="单行文本输入框"/><br />
            <input type="password" id="Text2" value="密码文本输入框"/><br />
            <textarea rows="3" cols="8">区域文本输入框</textarea><br />
            <input type="password" id="Text3" value="密码文本输入框"/><br />
            <button>Button</button><br />
        </form>
  </body>
</html>

 

posted @ 2014-12-11 09:55  雪中飞雁  阅读(75)  评论(0)    收藏  举报