一个简单的小问题,大伙看看吧 这个太简单了,根本就不需要什么jsp的知识,用javascript就可以搞定。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language='javascript'>function formaction(){if ((window.form1.username.value!="aa") && (window.form1.password.value!="bb")) { alert("用户名称、口令错误"); return false; }window.form1.action="login.jsp"window.form1.submit();}</script><form method="POST" name="form1"><center><table border=0 width="100%"><tbody> <tr> <td align=center valign=center><p><br> <ul> <li><b>用户名称</b></li><input type=text name="username"><br<li><b>用户口令</b></li><input type="PASSWORD" name="password"> </ul> </td> </tr></tbody></table><input type=button id=button1 value="确 定" onclick="return formaction()"></center></form> tomcat用户权限管理配置 JSTL标签 怎样判断字符串相等? 请教jsp部署问题 structs中<br>问题! 学习JSP第二天,请问…… 大家给我些意见 用JDBC连远程的数据库是不是超慢啊? 请有经验高手解决数据库设计问题 大侠,如何在JSP中上传图片?最好有源程序 :) 急需帮助!!!!其实是个小问题。代码如下: 请教高手:如何在jsp中实现无缓存! jsp页面中的怪现象:关于提交submit表单元素的问题!!
function formaction()
{
if ((window.form1.username.value!="aa") && (window.form1.password.value!="bb"))
{
alert("用户名称、口令错误");
return false;
}
window.form1.action="login.jsp"
window.form1.submit();
}
</script><form method="POST" name="form1">
<center>
<table border=0 width="100%">
<tbody>
<tr>
<td align=center valign=center><p><br>
<ul>
<li><b>用户名称</b></li>
<input type=text name="username"><br
<li><b>用户口令</b></li>
<input type="PASSWORD" name="password">
</ul>
</td>
</tr>
</tbody>
</table><input type=button id=button1 value="确 定" onclick="return formaction()"></center>
</form>