zoukankan      html  css  js  c++  java
  • ajax jquery

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <link rel="stylesheet" href="index.css" type="text/css" />
    <script type="text/javascript" src="jquery-1.7.2.js"></script>


    <script type="text/javascript">
    $($("userForm").click(function() {
    submitForm();
    return false;//阻止非IE浏览器表单提交
    }));
    function submitForm() {
    var userNameVal = $("#userName").val();
    var passWordVal = $("#passWord").val();
    alert(userNameVal);
    $.ajax({
    type : "post",
    url : "loginAction.action",
    dataType : "json",
    data : {
    "user.userName" : userNameVal,
    "user.passWord" : passWordVal
    }
    });

    }
    </script>
    <title>登陆</title>
    </head>
    <body>
    <div class="login">

    <form name="userForm" method="post" onsubmit="return false;" >
    <table cellSpacing=0 cellPadding=0 width=230 border=0>
    <tr height=5>
    <td width=5></td>
    <td width=56></td>
    <td></td>
    </tr>
    <tr height=36>
    <td></td>
    <td>
    用户名
    </td>
    <td>
    <input
    style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
    maxLength=30 size=24 id="userName">
    </td>
    </tr>
    <tr height=36>
    <td>
    &nbsp;

    </td>
    <td>
    口 令
    </td>
    <td>
    <input
    style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
    type="password" maxLength=30 size=24 id="passWord">
    </td>
    </tr>
    <tr height=5>
    <td colSpan=3></td>
    </tr>
    <tr>
    <td>
    &nbsp;

    </td>
    <td>


    </td>
    <td>
    <input id="submitButton" type=image height=18 width=70
    src="images/bt_login.gif" onclick="submitForm()">
    </td>
    </tr>
    </table>
    </form>


    <div />
    </body>
    </html>

  • 相关阅读:
    LPR之我见
    安装tensorflow2.2cpu的简洁方法
    anaconda安装keras
    redis 查看当前连接数
    2020 8 14
    docker安装jenkins
    使用docker安装gitlab
    提问:游戏测试与一般的软件测试的区别在哪里?
    “战斗天使”- 测试媛是如何崛起的?
    关系型数据库的几种常用主键
  • 原文地址:https://www.cnblogs.com/kisstherain/p/4445675.html
Copyright © 2011-2022 走看看