jsp页面跳转问题
这是一个用户注册的页面,部分代码(没有错误)已略,可是不能实现form的action跳转
checkform()里明明有document.form.submit(),就是不能跳转,
能帮我看下问题出在哪吗?
这是照着书上的例子写的,注册和重置动都作是通过图片来处理的。
请不吝赐教,在下不胜感激。。。
<%@ page contentType="text/html;charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>用户注册</title></head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312"/>
<link rel="styleSheet" href="register.css" type="text/CSS" />
<script language="javascript">
<!--
function checkform(){
if(document.form.ID.value==""|| !(document.form.ID.value).indexOf("/")||
!(document.form.ID.value).indexOf(".")){
alert("用户名为空或者有非法字符!");
document.form.ID.focus();
}
else if(document.form.password.value==""||(document.form.password.value).length<6){
alert("密码为空或者太短,为了你的安全请重新填写!");
&n
相关文档:
JSP中结果集显示如下:
<
ww:iterator
value
=
"resultList"
status
=
"status"
>
<
tr
class
=
"<ww:if test="
#status.even"
>
row-even
</
ww:if
> ......
public class TaskBean extends Thread{
public TaskBean(){
}
private int percent=0;
private boolean complete=false;
public synchronized&nb ......
JSP中可能会碰到的问题解答
来源:不详 作者:佚名 更新时间: 2009年07月02日 点击:
JSP中可能会碰到的问题解答
1、如何混合使用Jsp和SSI #include?
在JSP中可以使用如下方式包含纯HTML:
< !--#include file="data.inc"-- >
但是如果data.inc中包含JSP CODE ,我们可以使用:
< %@include file= ......
<%@ page contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*" %>
<%
//在这里如果写成“WEB-INF\templates\template.htm”程序会报错
String filePath = request.getRealPath("/")+"WEB-INF/templates/template.htm"; &nbs ......
一、安装JDK 首先下载JDK 5.0(JDK 5.0的下载页面为:http://java.sun.com/j2se/1.5.0/download.jsp); 然后运行JDK 5.0安装程序jdk-1_5_0_06-windows-i586-p.exe,安装过程中所有选项保持默认;最后配置JDK的环境变量:在“我的电脑”上点右键—>“属性”—>“高级”& ......