html页面怎么跳到jsp网页是代码,求大神!!

koer0 2012-09-23 10:55:00

<html>
<head>
<title>login</title>
<meta http-equiv="Content-Type" content="textml; charset=gbk">
<style type="text/css">
input {
font-family:"黑体";
alien:center;
font-size:"小四";
color:"red";
font-style:italic;
}
</style>
<script type="text/javascript">
function check_name(){
if (myform.use.value == "") {
alert("请填写您的用户名!");
myform.use.focus();
return false;
}
else if(myform.use.value.length<2 || myform.use.value.length>20){
alert("用户名的长度必须在2-20之间!");
myform.use.focus();
return false ;
}
else if(myform.use.value == "11111111" && myform.password.value == "33333333"){
window.location.href="lx2_1.jsp";
}
else {
alert("密码错误");
}
}
</script>

</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"

marginheight="0">
<!-- Save for Web Slices (login.jpg) -->
<form name="myform" method="post" action="">
<table id="__01" width="1001" height="581" border="0" cellpadding="0"

cellspacing="0">
<tr>
<td colspan="8">
<img src="images/login_01.gif" width="1000" height="229"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="229" alt=""></td>
</tr>
<tr>
<td rowspan="11">
<img src="images/login_02.gif" width="712" height="351"

alt=""></td>
<td colspan="5" width="169" height="19">
<input type="text" name="use"></td>
<td rowspan="11">
<img src="images/login_04.gif" width="117" height="351"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="20" alt=""></td>
</tr>
<tr>
<td colspan="6">
<img src="images/login_05.gif" width="171" height="16"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="16" alt=""></td>
</tr>
<tr>
<td colspan="7" width="171" height="22">
<input type="text" name="password"> </td>
<td>
<img src="images/分隔符.gif" width="1"

height="20" alt=""></td>
</tr>
<tr>
<td colspan="6">
<img src="images/login_07.gif" width="171" height="15"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="15" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/login_08.gif" width="54" height="18"

alt=""></td>
<td colspan="4" rowspan="4">
<img src="images/login_09.gif" width="117" height="58"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="18" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/login_10.gif" width="54" height="15"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="15" alt=""></td>
</tr>
<tr>
<td>
<img src="images/login_11.gif" width="15" height="12"

alt=""></td>
<td rowspan="2">
<img src="images/login_12.gif" width="39" height="25"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="12" alt=""></td>
</tr>
<tr>
<td rowspan="4">
<img src="images/login_13.gif" width="15" height="235"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="13" alt=""></td>
</tr>
<tr>
<td colspan="2" rowspan="2">
<img src="images/login_14.gif" width="51" height="19" alt=""

onClick="check_name()"></td>
<td rowspan="3">
<img src="images/login_15.gif" width="15" height="222"

alt=""></td>
<td>
<img src="images/login_16.gif" width="45" height="14" alt=""

onClick="document.myform.reset()"></td>
<td rowspan="3">
<img src="images/login_17.gif" width="45" height="222"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="14" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="images/login_18.gif" width="45" height="208"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="13" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/login_19.gif" width="51" height="195"

alt=""></td>
<td>
<img src="images/分隔符.gif" width="1"

height="195" alt=""></td>
</tr>
<tr>
<td>
<img src="images/分隔符.gif" width="712"

height="1" alt=""></td>
<td>
<img src="images/分隔符.gif" width="15"

height="1" alt=""></td>
<td>
<img src="images/分隔符.gif" width="39"

height="1" alt=""></td>
<td>
<img src="images/分隔符.gif" width="12"

height="1" alt=""></td>
<td>
<img src="images/分隔符.gif" width="15"

height="1" alt=""></td>
<td>
<img src="images/分隔符.gif" width="45"

height="1" alt=""></td>
<td>
<img src="images/分隔符.gif" width="45"

height="1" alt=""></td>
<td>
<img src="images/分隔符.gif" width="117"

height="1" alt=""></td>
<td></td>
</tr>
</table>
</form>
<!-- End Save for Web Slices -->
</body>
</html>
...全文
1029 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
helloworldysn 2012-09-25
  • 打赏
  • 举报
回复
能清楚地描述一下你的问题吗?
koer0 2012-09-25
  • 打赏
  • 举报
回复
@ty0415

这不是声明么??
ty0415 2012-09-25
  • 打赏
  • 举报
回复
<%!int i=0;String name[]={"丁一","倪二","张三","李四","王五"}; String mood[]={"一般","差"};
double wage[]={560.0,640.0,720,800,1200};
%>
去掉前面感叹号!!!!
koer0 2012-09-25
  • 打赏
  • 举报
回复
怎么,哪里错了啊,求
koer0 2012-09-25
  • 打赏
  • 举报
回复
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%!int i=0;String name[]={"丁一","倪二","张三","李四","王五"}; String mood[]={"一般","差"};
double wage[]={560.0,640.0,720,800,1200};
%>
<html>
<head>
<base href="<%=basePath%>">

<title>
101304045:<%=(new java.util.Date()).toLocaleString()%>
</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">
-->

</head>

<body>

<table width="163" border="1">
<tr>
<td width="66" height="37"> 姓名</td>
<td width="81"> 实际工资</td>
<td width="81"> 心情状态</td>
</tr>
<% for(int i=0;i<5;i++){ %>
<tr>
<td height="31"><%=name[i] %></td>
<td><%=wage[i] %></td>
<td>
<%if(wage[i]>=800){%>
<%=mood[0] %> <%} %>
<%if(wage[i]<800){%>
<%=mood[1] %> <%} %>
</td>
</tr>
<% } %>

</table>
</body>
</html>
翱翔的苍鹰 2012-09-24
  • 打赏
  • 举报
回复
你可以将你的代码放在jsp页面里运行下,就知道了
iGoodLoser 2012-09-24
  • 打赏
  • 举报
回复
楼主用的什么servlet容器?
ddboy310 2012-09-24
  • 打赏
  • 举报
回复
没明白你要问什么啊?
YAVA_2009 2012-09-24
  • 打赏
  • 举报
回复
jsp页面的头文件加了么:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
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>your jsp</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">
</head>
koer0 2012-09-24
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 的回复:]

楼主用的什么servlet容器?
[/Quote]
tomact

87,997

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧