(028)jquery_表单选择器button

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
  <head>
    <title>form_checkbox.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: blue;
            color:Orange;
        }
    </style>
    <script type="text/javascript" src="../js/jquery/jquery190.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("#frmTest :button").addClass("bg_blue");
        });
    </script>
  </head>
  
  <body>
        <h3>修改表单中按钮元素的背景色</h3>
        <form id="frmTest" action="#">
            <input id="Button1" type="button" value="我是普通按钮" /><br />
            <input id="Submit1" type="submit" value="点我就提交" /><br />
            <button>我也是普通按钮</button><br />
        </form>
  </body>
</html>

 

posted @ 2014-12-15 15:04  雪中飞雁  阅读(59)  评论(0)    收藏  举报