<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>西安小升初</title>
</head>
<body>
<%
session.setAttribute("username", "刘利新");
%>
<a href="NewFile.jsp">走2个</a>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript">
function set(selectPerson) { //自动添加聊天对象
if (selectPerson != "${username}") {
//form1.to.value = selectPerson;
alert("That's ok");
} else {
alert("请重新选择聊天对象!");
}
}
</script>
<title>西安小升初</title>
</head>
<body>
<script>
set("刘利新");
</script>
</body>
</html>
源代码:http://pan.baidu.com/share/link?shareid=480898&uk=3878681452