调试出错!!

bafnay 2004-10-31 09:49:24
这是一个用户注册页面:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ include file="include.inc"%>
<%@ include file="trans.jsp"%>

<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="error.jsp" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><LINK
href="hellking.css" type=text/css rel=stylesheet>

<body>
<table width=88% border="1" height="100%" cellpadding="0" cellspacing="0" align="left" bordercolor="#000080" class=tablebody2>
<tr>
<td>

<script language="javascript">
<!-- Begin validation script
function checkId(o){
if(o.value!="")
for(i=0;i<o.value.length;i++){
if(!((o.value.charCodeAt(i)>=48&&o.value.charCodeAt(i)<=57)||(o.value.charCodeAt(i)>=65&&o.value.charCodeAt(i)<=90)||(o.value.charCodeAt(i)>=97&&o.value.charCodeAt(i)<=122)))
{
alert("ID只能由字母和数字组成!");
o.focus();
break;
}
}
}
function checkConfirm(o1,o2){
if(o2.value!=""){
if(o2.value!=o1.value){
alert("两次输入的密码必须相同!");
o1.focus();
}
}
}
function checkform2(){
if(document.form2.name.value==""){
alert("请输入姓名!");
return false;
}
else if(document.form2.pinyin.value==""){
alert("请输入姓名的拼音!");
return false;
}
else if(document.form2.no.value==""){
alert("请输入员工号码!");
return false;
}
else if(document.form2.id.value==""){
alert("请输入用户名!");
return false;
}
else if(document.form2.psw.value==""){
alert("请输入密码!");
return false;
}
else if(document.form2.repsw.value!=document.form2.psw.value){
alert("请正确输入密码");
return false;
}
else
return true;
...全文
44 点赞 收藏 9
写回复
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
tomwen 2004-11-01
多调试一下
回复
bafnay 2004-11-01
不会吧,那其它页就可以访问。我想不会是服务器没配好的吧
回复
ggjjzhzz 2004-10-31
是你服务器没设置好吧?
回复
bafnay 2004-10-31
高手啊,帮帮我解决啊
回复
bafnay 2004-10-31
什么意思???

我这个进都进不了
回复
tomwen 2004-10-31
页面我能进去
就是编译不了
回复
bafnay 2004-10-31
帮帮我吧,大?????
回复
bafnay 2004-10-31
为何我输入http://127.0.0.1:8080/jspdev/chen.jsp后出现错误是找不到服务器,也没有什么前出现错误代码,就跟我们平时访问某个网页找不到服务器时一样。
狂晕
我把另一个jsp页面放到这个下面就可以。我碰到好多个是这样。
急啊!
回复
bafnay 2004-10-31
}
// End of validation script -->

</script><script language="JavaScript">
<!--
function RgTest()
{
if(document.form1.userid.value=="")
{
window.alert("请输入用户名名称!");
document.form1.resource.focus();
return false;
}
if(document.form1.name.value=="")
{
window.alert("请输入真实姓名!");
document.form1.userid.focus();
return false;
}
if(document.form1.street.value=="")
{
window.alert("请完整输入信息!");
document.form1.userid.focus();
return false;
}
if(document.form1.city.value=="")
{
window.alert("请完整输入信息!");
document.form1.userid.focus();
return false;
}
if(document.form1.state.value=="")
{
window.alert("请完整输入信息!");
document.form1.userid.focus();
return false;
}
if(document.form1.zipCode.value=="")
{
window.alert("请完整输入信息!");
document.form1.userid.focus();
return false;
}
if(document.form1.phone.value=="")
{
window.alert("请完整输入信息!");
document.form1.phone.focus();
return false;
}
if(document.form1.email.value=="")
{
window.alert("请完整输入信息!");
document.form1.email.focus();
return false;
}
if(document.form1.cardNumber.value=="")
{
window.alert("请完整输入信息!");
document.form1.cardNumber.focus();
return false;
}
if(document.form1.password.value!=document.form1.confirmpassword.value)
{
window.alert("请正确输入密码!");
document.form1.password.focus();
return false;
}

return true;
}
//-->
</script>

<%
String userid = request.getParameter("userid");
if ( userid == null ) {
userid = "";
}
String email = request.getParameter("email");
if ( email == null ) {
email = "";
}
String name = request.getParameter("name");
if ( name == null ) {
name = "";
}
String phone = request.getParameter("phone");
if ( phone == null ) {
phone = "";
}
String street = request.getParameter("street");
if ( street == null ) {
street = "";
}
String city = request.getParameter("city");
if ( city == null ) {
city = "";
}
String state = request.getParameter("state");
if ( state == null ) {
state = "";
}
String zipCode = request.getParameter("zipCode");
if ( zipCode == null ) {
zipCode = "";
}
String cardNumber = request.getParameter("cardNumber");
if ( cardNumber == null ) {
cardNumber = "";

}

String errorMessage = request.getParameter("errorMessage");
%>
<%
if ( errorMessage != null ) {
%>
<span class="headingred">
<%=errorMessage%>
</span>
<br>
<%
}
%>

<form method="post" action="newuser.jsp" name="form1">
<table border="0" cellspacing="0" cellpadding="0" width="500">

<tr><td colspan="6"><IMG height=10 alt="" src="images/spacer.gif" width=1 border=0></td></tr>
<tr>
<td align="right"><IMG height=18 alt="" src="images/titlebar_left.gif" width=6 border=0></td>
<td background="images/titlebar_stretch.gif" valign="center"></td>
<td background="images/titlebar_stretch.gif" valign="center"></td>
<td background="images/titlebar_stretch.gif" valign="center"></td>
<td background="images/titlebar_stretch.gif" align="right" valign="center"></td>
<td><IMG height=18 alt="" src="images/titlebar_right.gif" width=6 border=0></td>
</tr>
<tr><td colspan="6"><IMG height=10 alt="" src="images/spacer.gif" width=1 border=0></td></tr>
<tr>
<td> </td>
<td> </td>

<td>用户名:</td>
<td><input size="15" name="userid" value=<%=userid%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr><td colspan="6"><IMG height=3 alt="" src="images/spacer.gif" width=1 border=0></td></tr>
<tr>
<td> </td>
<td> </td>

<td>密码:</td>
<td><input type="password" size="15" name="password"></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>

<td>确认密码:</td>
<td><input type = "password" size="15" name="confirmpassword"></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>

<td>真实姓名:</td>
<td><input size="15" name="name" value=<%=name%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>电话:</td>
<td><input size="15" name="phone" value=<%=phone%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>email:</td>
<td><input size="15" name="email" value=<%=email%>></input></td>
<td> </td>
<td> </td>
</tr>

<tr>
<td> </td>
<td> </td>

<td>街道:</td>
<td><input size="15" name="street" value=<%=street%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="18"> </td>
<td> </td>

<td>城市:</td>
<td><input size="15" name="city" value=<%=city%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>

<td>省:</td>
<td><input size="15" name="state" value=<%=state%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>

<td>邮编:</td>
<td><input size="15" name="zipCode" value=<%=zipCode%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>信息卡信息:</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>卡号:</td>
<td><input size="15" name="cardNumber" value=<%=cardNumber%>></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>开户银行:</td>
<td><select size="1" name="cardType">
<option value="01">建设银行</option>
<option value="02">工商银行</option>
<option value="03">交通银行</option>
<option value="04">农业银行</option>
<option value="05">招商银行</option>
</select></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>个人定制信息:</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>喜欢的图类别:</td>
<td><select size="1" name="fanvcategory">
<option value="01">计算机</option>
<option value="02">英文</option>
<option value="03">散文</option>
<option value="04">小说</option>
<option value="05">天文</option>
<option value="06">科幻</option>
<option value="07">武侠</option>
<option value="08">漫画</option>
</select> -->
<select name="fanvcategory">
<%
Class.forName(CLASSFORNAME);
Connection con = DriverManager.getConnection(SERVANDDB,USER,PWD);
Statement statement=con.createStatement();
ResultSet rst=statement.executeQuery("select * from category");
while(rst.next())
{
out.println(trans("<option value="+rst.getString("catid")+">"+rst.getString("name")+"</option>"));
}
con.close();
%>
</select>
</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>是否需要在提供购物时的提示:</td>
<td><input size="15" name="banneropt" type="checkbox" ></input></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td></td>
<td><input type="image" src="image/loginsubmit.gif" name="submit" onClick="return RgTest()"></input></td>
<td> </td>
<td> </td>
</tr>
</table>
<td><IMG height=3 alt="" src="image/spacer.gif" width=1 border=0>

</form>



</tr>
</table>

</body>
</html>
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告