67,518
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='/CRUDtoUser/dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/engine.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function displayUser(users) {
var tbody = document.getElementById("tbody");
for(var item in users) {
var user = users[item];
var tr = document.createElement("tr");
var tdUsername = document.createElement("td");
tdUsername.innerText = user.username;
tr.appendChild(tdUsername);
var tdAddress = document.createElement("td");
tdAddress.innerText = user.address;
tr.appendChild(tdAddress);
var tdEmail = document.createElement("td");
tdEmail.innerText = user.email;
tr.appendChild(tdEmail);
// DOWN:
var tdUpdate = document.createElement("td");
var aUpdate = document.createElement("a");
aUpdate.innerText = "修改";
aUpdate.setAttribute("href", "#");
aUpdate.onclick = function() {
toUpdateUser(user);
}
tdUpdate.appendChild(aUpdate);
tr.appendChild(tdUpdate);
// UP :
tbody.appendChild(tr);
}
}
function toUpdateUser(user) {
dwr.util.setValues(user);
}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='/CRUDtoUser/dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/engine.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function displayUser(users) {
dwr.util.removeAllRows("tbody");
dwr.util.addRows("tbody", users, cellFuncs, { escapeHtml : false });
}
var cellFuncs = [
function(user) { return user.username; },
function(user) { return user.address; },
function(user) { return user.email; },
function(user) {
return "<a href=\"javascript:toUpdateUser(" + userToString(user) + ")\">修改</a>"
}
];
//function toUpdateUser(user) {
//dwr.util.setValues(user);
//}
function toUpdateUser(user) {
DWRUtil.setValue("userid", user.userid);
DWRUtil.setValue("username", user.username);
DWRUtil.setValue("address", user.address);
DWRUtil.setValue("email", user.email);
}
function userToString(user) {
var u = "{ userid : " + user.userid + ",";
u += " username : '" + user.username + "',";
u += " address : '" + user.address + "',";
u += " email : '" + user.email + "' }";
return u;
}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='/CRUDtoUser/dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/engine.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function displayUser(users) {
var tbody = document.getElementById("tbody");
for(var item in users) {
var user = users[item];
var tr = document.createElement("tr");
var tdUsername = document.createElement("td");
tdUsername.innerText = user.username;
tr.appendChild(tdUsername);
var tdAddress = document.createElement("td");
tdAddress.innerText = user.address;
tr.appendChild(tdAddress);
var tdEmail = document.createElement("td");
tdEmail.innerText = user.email;
tr.appendChild(tdEmail);
// DOWN:
var tdUpdate = document.createElement("td");
var aUpdate = document.createElement("a");
aUpdate.innerText = "修改";
var u = "{ userid : " + user.userid + ", username : '" + user.username + "', address : '" + user.address + "', email : '" + user.email + "' }";
aUpdate.setAttribute("href", "javascript:toUpdateUser(" + u + ")");
tdUpdate.appendChild(aUpdate);
tr.appendChild(tdUpdate);
// UP :
tbody.appendChild(tr);
}
}
function toUpdateUser(user) {
//var u = eval('(' + user + ')');
dwr.util.setValues(user);
}
//function toUpdateUser(userid, username, address, email) {
//DWRUtil.setValue("userid", userid);
//DWRUtil.setValue("username", username);
//DWRUtil.setValue("address", address);
//DWRUtil.setValue("email", email);
//}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='/CRUDtoUser/dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/engine.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function displayUser(users) {
var tbody = document.getElementById("tbody");
for(var item in users) {
var user = users[item];
var tr = document.createElement("tr");
var tdUsername = document.createElement("td");
tdUsername.innerText = user.username;
tr.appendChild(tdUsername);
var tdAddress = document.createElement("td");
tdAddress.innerText = user.address;
tr.appendChild(tdAddress);
var tdEmail = document.createElement("td");
tdEmail.innerText = user.email;
tr.appendChild(tdEmail);
// DOWN:
var tdUpdate = document.createElement("td");
var aUpdate = document.createElement("a");
aUpdate.innerText = "修改";
aUpdate.setAttribute("href", "javascript:toUpdateUser(" + userToString(user) + ")");
tdUpdate.appendChild(aUpdate);
tr.appendChild(tdUpdate);
// UP :
tbody.appendChild(tr);
}
}
function toUpdateUser(user) {
//var u = eval('(' + user + ')');
dwr.util.setValues(user);
}
//function toUpdateUser(userid, username, address, email) {
//DWRUtil.setValue("userid", userid);
//DWRUtil.setValue("username", username);
//DWRUtil.setValue("address", address);
//DWRUtil.setValue("email", email);
//}
function userToString(user) {
var u = "{ userid : " + user.userid + ",";
u += " username : '" + user.username + "',";
u += " address : '" + user.address + "',";
u += " email : '" + user.email + "' }";
return u;
}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function displayUser(users) {
DWRUtil.removeAllRows("tbody");
DWRUtil.addRows("tbody", users, [tdUsername, tdAddress, tdEmail, aUpdate]);
}
var tdUsername = function(user) { return user.username; };
var tdAddress = function(user) { return user.address; };
var tdEmail = function(user) { return user.email; };
var aUpdate = function(user) {
return "<a href=javascript:toUpdateUser('" + user.username + "');>修改</a>";
};
function toUpdateUser(username) {
document.all.username.value = username;
}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function displayUser(users) {
DWRUtil.removeAllRows("tbody");
DWRUtil.addRows("tbody", users, [tdUsername, tdAddress, tdEmail, aUpdate], { escapeHtml : false });
}
var tdUsername = function(user) { return user.username; };
var tdAddress = function(user) { return user.address; };
var tdEmail = function(user) { return user.email; };
var aUpdate = function(user) {
return "<a href=javascript:toUpdateUser('" + user.username + "');>修改</a>";
};
function toUpdateUser(username) {
document.all.username.value = username;
}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
var cellFuncs = [
function( user ) { return user.username; },
function( user ) { return user.address; },
function( user ) { return user.email; },
function( user ) {
var params = "'" + user.username + "', '" + user.address + "', '" + user.email + "', '" + user.userid + "'";
return "<a href=\"javascript:toUpdateUser(" + params + ");\">修改</a>";
}
];
function displayUser(users) {
DWRUtil.removeAllRows( "tbody" );
DWRUtil.addRows( "tbody", users, cellFuncs, { escapeHtml : false } );
}
function toUpdateUser( username, address, email, userid ) {
dwr.util.setValue( "username", username );
dwr.util.setValue( "address", address );
dwr.util.setValue( "email", email );
dwr.util.setValue( "userid", userid );
}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='/CRUDtoUser/dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/engine.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function displayUser(users) {
var tbody = document.getElementById("tbody");
for(var item in users) {
var user = users[item];
var tr = document.createElement("tr");
var tdUsername = document.createElement("td");
tdUsername.innerText = user.username;
tr.appendChild(tdUsername);
var tdAddress = document.createElement("td");
tdAddress.innerText = user.address;
tr.appendChild(tdAddress);
var tdEmail = document.createElement("td");
tdEmail.innerText = user.email;
tr.appendChild(tdEmail);
// DOWN:
var tdUpdate = document.createElement("td");
var aUpdate = document.createElement("a");
aUpdate.innerText = "修改";
aUpdate.setAttribute("href", "javascript:toUpdateUser("+user.userid+", '"+user.username+"', '"+user.address+"', '"+user.email+"')");
tdUpdate.appendChild(aUpdate);
tr.appendChild(tdUpdate);
// UP :
tbody.appendChild(tr);
}
}
//function toUpdateUser(user) {
//dwr.util.setValues(user);
//}
function toUpdateUser(userid, username, address, email) {
DWRUtil.setValue("userid", userid);
DWRUtil.setValue("username", username);
DWRUtil.setValue("address", address);
DWRUtil.setValue("email", email);
}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="gb18030"%>
<%
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 'index.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">
-->
<script type='text/javascript' src='/CRUDtoUser/dwr/interface/userDAO.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/engine.js'></script>
<script type='text/javascript' src='/CRUDtoUser/dwr/util.js'></script>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function displayUser(users) {
var tbody = document.getElementById("tbody");
for(var item in users) {
var user = users[item];
var tr = document.createElement("tr");
var tdUsername = document.createElement("td");
tdUsername.innerText = user.username;
tr.appendChild(tdUsername);
var tdAddress = document.createElement("td");
tdAddress.innerText = user.address;
tr.appendChild(tdAddress);
var tdEmail = document.createElement("td");
tdEmail.innerText = user.email;
tr.appendChild(tdEmail);
// DOWN:
var tdUpdate = document.createElement("td");
var aUpdate = document.createElement("a");
aUpdate.innerText = "修改";
aUpdate.setAttribute("href", "javascript:toUpdateUser(" + user + ")");
tdUpdate.appendChild(aUpdate);
tr.appendChild(tdUpdate);
// UP :
tbody.appendChild(tr);
}
}
function toUpdateUser(user) {
dwr.util.setValues(user);
}
//function toUpdateUser(userid, username, address, email) {
//DWRUtil.setValue("userid", userid);
//DWRUtil.setValue("username", username);
//DWRUtil.setValue("address", address);
//DWRUtil.setValue("email", email);
//}
window.onload = function() {
initUser();
}
</script>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>username</th><th>address</th><th>email</th><th colspan="2">操作</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<p></p>
<p></p>
username:<input type="text" id="username"/><br>
address :<input type="text" id="address"/><br>
email :<input type="text" id="email"/><br>
userid :<span id="userid">-1</span><br><br>
<input type="button" value="保存"/>
</body>
</html>
<script type="text/javascript">
function initUser() {
userDAO.getAllUsers(displayUser);
}
function userToString( user )
{
var s = "{ username: \'" + user.username + "\' , ";
s += "address: \'" + user.address + "\' , ";
s += "email: \'" + user.email + "\' ,";
s += "userid: \'" + user.userid + "\' }";
return s;
}
var cellFuncs = [
function( user ) { return user.username; },
function( user ) { return user.address; },
function( user ) { return user.email; },
function( user ) {
return "<a href=\"javascript:toUpdateUser( " + userToString( user ) + " );\">修改</a>";
}
];
function displayUser(users) {
DWRUtil.removeAllRows( "tbody" );
DWRUtil.addRows( "tbody", users, cellFuncs, { escapeHtml : false } );
}
function toUpdateUser( user ) {
DWRUtil.setValue( "username", user.username );
DWRUtil.setValue( "address", user.address );
DWRUtil.setValue( "email", user.email );
DWRUtil.setValue( "userid", user.userid );
}
window.onload = function() {
initUser();
}
</script>