报错Uncaught TypeError: Cannot read property 'open' of undefined是写脚本语言时open这个方法使用提

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'login.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link type="text/css" rel="stylesheet" href="css/style.css" />

<script type="text/javascript">
var xmlhttp;
function createXMLHttp(){
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
try {
xmhttp = new XMLHttpRequest();
if (xmlhttp.overrideMimeType) {
xmlhttp.overrideMimeType("text/xml");
}
} catch (e) {}
}
}
}
function cheaklogin(){
//document.getElementsByName("name")可以以这种形式不
var uname=document.forms[1].userName;
var upwd=document.forms[1].passWord;
if(uname!=""&&upwd!=""){
createXMLHttp();
alert("1");
var url="lg?userNameInput="+uname;
alert("2");
xmlhttp.open("get",url,true);
alert("3");
xmlhttp.send();

xmlhttp.onreadystatechange=processResponse;
}
}
function processResponse(){
if(xmlhttp.readyState==4&&xmlhttp.status==200){
var sp=document.getElementById("cuname");
sp.innerHTML=xmlhttp.responseText;
}
}
</script>

</head>

<body>
<div id="header" class="wrap">
<div id="navbar">
<form method="get" name="search" action="">
搜索:<input class="input-text" type="text" name="keywords" /><input class="input-btn" type="submit" name="submit" value="" />
</form>
</div>
</div>
<div id="login">
<h2>用户登陆</h2>
<form method="post" action="">
<dl>
<dt>用户名:</dt>
<dd><input class="input-text" type="text" name="userName" onblur="cheaklogin()"/><span id="cuname" ></span></dd>
<dt>密 码:</dt>
<dd><input class="input-text" type="password" name="passWord" /><span id="cupwd"></span></dd>
<dt></dt>
<dd class="button"><input class="input-btn" type="submit" name="submit" value="" /><input class="input-reg" type="button" name="register" value="" onclick="window.location='register.html';" /></dd>
</dl>
</form>
</div>
<div id="footer" class="wrap">
版权所有</div>

</body>
</html>
最新回答
假扮的天使

2025-02-25 04:38:19

目测是因为分页参数问题,如果不是请忽略没开分页可以直接传集合转化为json,开分页一般需要dao{total:100,rows={ {},{} }}这种形式,jq读取rows为空,找不到rows.length属性就会报这种错。

把getComputedStyle(arguments[0],false)看做一个对象。

getComputedStyle(arguments[0],false).arguments[1]的意思是对象arguments(数组)属性的第二个值。

getComputedStyle(arguments[0],false)[arguments[1]]的意思是取“arguments[1]的值”对应的属性值。

扩展资料:

当需要用到数据时再向系统请求,使系统将数据由

辅助存储器
传入存储器上,这就叫“需求分页”。它使得系统不需要将全部的程序都放在存储器上,减少了所需要的存储器的数量。所有现代系统都使用按需页面调度(paging)的方式。

当系统查看分页表时认为某些数据可能需要用到,而先将数据传到存储器上的行为,就叫做“先行分页”, 当存储器够大的话通常会采取这种方式。

Unix系统会定期使用sync程序来清理所有经过更动的帧,它会将所有被更动过的帧存到辅助存储器中。Windows系统有时亦会进行类似功能的操作,它可以使新程序在打开时更快速。

参考资料来源:

百度百科-分页