<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>4</title><style type="text/css">
<!--
#t01 tr td #username {
background-color: #6CF;
margin: 0px;
padding: 0px;
width: auto;
font-size: 18px;
color: #60C;
}
#t01 tr td #password {
background-color: #6CF;
font-size: 18px;
color: #60C;
}
#t01 tr td {
background-color: #6CF;
font-size: 12px;
}
-->
</style>
<script language="javascript"> function check_login(form)
{
if(form.username.value=="")
{
alert("请输入您的用户名");
form.username.focus();
return false;
}
if(form.password.value=="")
{
alert("请输入您的密码");
form.password.focus();
return false;
}
}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (4.psb) -->  
<form name="form1" method="post" action="loginok.jsp" >
<table id="t01" width="1000" height="700" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="7">
<img src="images/4_01.gif" width="1000" height="538" alt=""></td>
</tr>
<tr>
<td>
<img src="images/4_02.gif" width="328" height="27" alt=""></td>
<td>
 
    <input name="username" type="text" id="username" size="12"  width="124" height="27" />
   
     </td>
<td>
<img src="images/4_04.gif" width="64" height="27" alt=""></td>
<td>
    <input name="password" type="password" id="password" size="12"  width="124" height="27">
    
   
</td>
<td>
<img src="images/4_06.gif" width="13" height="27" alt=""></td>
<td>
<img src="images/4_07.gif" width="79" height="27" alt="" OnClick="check_login(form1);javascripte:submit();"></td>
<td>
<img src="images/4_08.gif" width="269" height="27" alt=""></td>
</tr>
<tr>
<td colspan="7">
<img src="images/4_09.gif" width="1000" height="135" alt=""></td>
</tr>
</table>
</form>
<!-- End ImageReady Slices -->
</body>
</html>
用到的数据库也测试也正常,前几天还能正确跳转的,不知道这会就不行了不知道哪里的问题好难受啊,求救!!!

解决方案 »

  1.   

    <img src="images/4_07.gif" width="79" height="27" alt="" OnClick="check_login(form1);javascripte:submit();">从你贴出的代码中,确实没有看到submit()的定义
    你都用了开发工具了,这种错误应该很容易就排查到才对呀
      

  2.   

    怎么定义?你check_login,上面就有一个
    function check_login(form){}。这不就是定义呀?你要执行一个功能函数,但那个功能函数都不存在呀。你以前能跳转。要不你以前用的是<input type="submit">按钮进行的跳转,要不就是你复制页面代码时,少复制了submit()函数。自己仔仔细细对着一下哪里不同就是了没有无缘无故的错误。
      

  3.   

    你这里是使用的是调用submit()方法,可是你没有定义这个方法,可以再你的form种添加一个type='submit'得标签
      

  4.   


    为什么在eclipse里的web Brower 可以跳转啊,为什么
      

  5.   

    我猜楼主是想用thisform.submit();直接使用submit();没有对象如何submit(),JS把它当成自定义函数了,所以报告未定义你应该给form加个id='form',然后这样
    document.getElementById('form').submit();
      

  6.   

    javascripte这个多了一个e是不是能识别哦?
    请测试下
      

  7.   

    把submit()改为
    document.getElementsByTagName('form')[0].submit(); 
    试试