日期:2014-05-16 浏览次数:20529 次
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import = "java.sql.*,com.xzh.util.*"%> <% Boolean isLogin = (Boolean)session.getAttribute("isLogin"); Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; conn = DBUtil.getConn(); pstmt = DBUtil.getPstmt(conn,"select * from t_msg"); rs = pstmt.executeQuery(); %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> . . . <script type="text/javascript" src="./global.js"></script> . . . <form action="addMsg.jsp" name="note" method="post" onsubmit="return check()"> . . .
function a(){ window.setInterval("b()",1000); } function b(){ var objTime = document.getElementById("time"); var time = objTime.innerHTML; time = time - 1; objTime.innerHTML = time; if(time==0){ var path = document.getElementById("path"); window.location=path; } } function check(){ var objForm = document.forms[0]; if(objForm.username.value.length==0){ alert("用户名不能为空!"); return false; } if(objForm.title.value.length==0){ alert("留言标题不能为空!"); return false; } if(objForm.email.value.length==0){ alert("电子邮件不能为空!"); return false; } if(objForm.iqcq.value.length==0){ alert("iqcq不能为空!"); return false; } if(objForm.mypage.value.length==0){ alert("我的主页不能为空!"); return false; } if(objForm.content.value.length==0){ alert("留言内容不能为空!"); return false; } return true; } function check_user(){ var objForm = document.forms[0]; if(objForm.password.equals(objForm.password_2)){ alert("密码不一致!"); return false; } if(objForm.id.value.length==0){ alert("用户名不能为空!"); return false; } if(objForm.password.value.length==0){ alert("密码不能为空!"); return false; } if(objForm.username.value.length==0){ alert("昵称不能为空!"); return false; } if(objForm.email.value.length==0){ alert("电子邮件不能为空!"); return false; } if(objForm.iqcq.value.length==0){ alert("iqcq不能为空!"); return false; } return true; }
<script type="text/javascript" src="/u/t5/t5.js"></script> <script type="text/javascript" src="http://counter.csdn.net/a/js/AreaCounter.js"></script>