马上就要求上手做项目,大家帮忙吧
...
<input type="text" name="username" style="width:150px;height:21px;border:solid 1px black">
...
<input type="password" name="psw" style="width:150px;height:21px;border:solid 1px black">
...
<input name=submit2 type="image" value="mysubmit" src="images/login_button.jpg" align="middle">
...
<%
String user=request.getParameter("username");
if (user==null)
{
out.print ("用户名不能为空")
}
String psw=request.getParameter("psw");
if (psw==null)
{
out.print ("密码不能为空")
}
%>
...像上面那样写不能响应啊
...
<input type="text" name="username" style="width:150px;height:21px;border:solid 1px black">
...
<input type="password" name="psw" style="width:150px;height:21px;border:solid 1px black">
...
<input name=submit2 type="image" value="mysubmit" src="images/login_button.jpg" align="middle">
...
<%
String user=request.getParameter("username");
if (user==null)
{
out.print ("用户名不能为空")
}
String psw=request.getParameter("psw");
if (psw==null)
{
out.print ("密码不能为空")
}
%>
...像上面那样写不能响应啊
解决方案 »
- apache代理的问题,求高手解答
- 全库查询如何实现,求思路或者实现方法!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- JSP能否监听页面事件?
- 在服务器端如何知道客户端的结束了浏览操作(既关闭了流览器),
- 有用过commons.fileupload上传文件成功的吗?
- 这样sql问题很怪!
- 怎么在本页面中用iframe的onmousemove
- 大型网站JSP 动态转静态的实现方法 大家帮帮忙
- 请教一个关于jsp连接sqlserver数据库的问题
- HashMap类的get()为什么不能用了?
- jsp 检索数据库记录数不正确!(只有10分了,不好意思!)
- oracle驱动程序的放置目录
<input type="text" name="username" onclick="chkUsername()" style="width:150px;height:21px;border:solid 1px black">
你在提交后的jsp或server或action中再操作数据库
可以考虑自己封装验证类来实现啊中国JavaEE技术交流社区-欢迎您的参与探讨!-- 打造“中国JavaEE技术交流社区“,欢迎j2ee爱好者朋友们的踊跃参与!
http://www.aspwind.cn
当你提交到jsp或servlet中后再验证也可以,
但你不觉得把什么操作都让服务器做会很耗资源吗?
用js就是尽量把操作放在客户端,而且验证的话也比java简单也强大
不知道你能理解吗?多想想吧,
好运!