导航首页 » 技术教程 » jQuery表单事件实例代码分享
jQuery表单事件实例代码分享 94 2024-02-21   

本文实例为大家分享了jQuery表单事件代码,供大家参考,具体内容如下

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>表单事件</title>
</head>
<style type="text/css" rel="stylesheet">
  .input_focus{
    background-color: #BEE7FC;
  }
 
</style>
<script type="text/javascript" src="http://www.gimoo.net/t/1901/js/jquery-1.8.3.js"></script>
<script language="JavaScript">
  $(document).ready(function () {
    $("[name=member]").focusin(function () {
      $(this).addClass("input_focus");
    });
    $("[name=member]").blur(function () {
      $(this).removeClass("input_focus");
    });
     
 
 
  });
 
 
 
</script>
<body>
<div id="login">
  <fieldset>
    <legend>用户登录</legend>
    <p>
      <label>用户名:</label>
      <input name="member" type="text" />
    </p>
    <p>
      <label>密码:</label>
      <input name="password" type="text" />
    </p>
    <p>
      <label>验证码:</label>
      <input name="code" type="text" class="code" />
      <img src="http://www.gimoo.net/t/1901/images/code.gif" width="80" height="30" /><a href="http://www.gimoo.net/t/1901/5c31b582d31ba.html">换一张</a>
    </p>
    <p>
      <input name="" type="button" class="btn" value="登录" />
      <a href="http://www.gimoo.net/t/1901/5c31b582d31ba.html">注册</a><span>|</span><a href="http://www.gimoo.net/t/1901/5c31b582d31ba.html">忘记密码?</a>
    </p>
  </fieldset>
</div>
</body>
</html>

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持绿夏网。



!!!站长长期在线接!!!

网站、小程序:定制开发/二次开发/仿制开发等

各种疑难杂症解决/定制接口/定制采集等

站长微信:lxwl520520

站长QQ:1737366103