⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.jsp

📁 Intellij IDEA做的struts项目源码
💻 JSP
字号:
<%--
  Created by IntelliJ IDEA.
  User: ZhangRui
  Date: 2007-10-13
  Time: 8:03:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=gb2312" language="java" %>
<html>
<head><title>JSP PAGE</title>
<style type="text/css">
<!--
.loginStyle {
	border: 1px solid #666666;
	width: 300px;
	height: 130px;
}
-->
</style>
</head>

<script type="text/javascript">
    var req;
    function reCheck() {
        req = new ActiveXObject('Microsoft.XMLHTTP');
        var param = "userName=" + document.form1.userName.value + "&passWord=" + document.form1.passWord.value +"&method=login";
        var linkurl = "login.do";
        req.open("POST", linkurl, true);
        req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        req.onreadystatechange = callback;
        req.send(param);
    }
    function callback() {
        var state = req.readyState;
        if (state == 4) {
            var data = req.responseText;
            FillInfo(data);
        }
    }
    function FillInfo(message) {
        var info = document.getElementById("info");
        info.innerHTML = message;
    }

	    function reShopList(){
        req=new ActiveXObject('Microsoft.XMLHTTP');
        req.open('get','shop.do',true);
        req.onreadystatechange=callback2;
        req.send(null);
    }
    function callback2() {
        var state = req.readyState;
        if (state == 4) {
            var data = req.responseText;
            FillInfo2(data);
        }
    }
    function FillInfo2(message) {
        var info = document.getElementById("shopList");
        info.innerHTML = message;
    }
</script>

<body>
<form name="form1" method="post" action="/login.do?method=login">



<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top" align="center">
    <div id="info" class="loginStyle">
    <br>
    登录框:
    (zhrln,123456)<br>
    <br>
    用户名:<input name="userName" type="text" style="width:170px">
    <br>
    <br>
    密&nbsp;&nbsp;码:<input name="passWord" type="password" style="width:170px">
    <br>
    <br>
    <input name="button" type="button" value="登录&gt;&gt;" onClick="reCheck();">
	<input name="submit" type="submit" value="submit 登录&gt;&gt;">
    <br><br>
</div>
    </td>
    <td valign="top" width="100%">
    <input type="button" value="查看列表" onClick="reShopList();">
	<input type="button" value="button 查看列表" onClick="window.open('shop.do')">
    <br>
    <div id="shopList" style="border:1px solid #666666;">&nbsp;</div>
    </td>
  </tr>
</table>



</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -