网络相册.pptVIP

  1. 1、本文档共53页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
子任务2:用户注册、用户退出功能实现 register.jsp form name=RegForm method=post action=RegisterServlet label div align=center“ br用 户 名:input type=text name=username br密  码:input type=password name=password br密码确认:input type=password name=dpassword br input type=button name=Submit value=注册 onClick=checkForm() onkeydown=if (event.keyCode==13) RegForm.submit();    input type=reset name=Submit2 value=清空 /div /label /form 子任务2:用户注册、用户退出功能实现 javascript script type=text/javascript function checkForm(){ var username = document.RegForm.username.value; var password = document.RegForm.password.value; var dpassword = document.RegForm.dpassword.value; if(username.length6||username.length12){ alert(提示:\n\n用户名必须大于6,小于12位); document.RegForm.username.value=; document.RegForm.username.focus(); return false; }else if(password.length6||password.length12){ alert(提示:\n\n密码必须大于6,小于12位); document.RegForm.password.value=; document.RegForm.password.focus(); return false; } 子任务2:用户注册、用户退出功能实现 else if(dpassword.length6||dpassword.length12){ alert(提示:\n\n密码必须大于6,小于12位); document.RegForm.dpassword.value=; document.RegForm.dpassword.focus(); return false; }else if(document.RegForm.password.value!=document.RegForm.dpassword.value){ alert(提示:\n\n 两次密码输入不一致,请重新输入); document.RegForm.password.value=; document.RegForm.dpassword.value=; document.RegForm.password.focus(); return false; }else{ //如果之前的验证都通过即可提交表单 document.RegForm.submit(); } } /script 任务二:创建、删除相册和添加、删除照片 上传组件commons-fileupload的使用 commons-fileupload介绍 commons-fileupload组件是用于专门上传文件的工具 commons-fileupload组件解决了常见的Web应用中文件上传的问题,它提供了一个易用的接口来管理上传到服务器的文件,可用于JSP和Servlet之中。 commons-fileupload组件可以分析输入请求,向应用程序提供一系列上传到服务器的文件。 上传的文件可以保留在内存中,也可以放入一个临时位置(允许配置一个表示文件大小的参数,如果上传的文件超过了该参数指定的大小,则把文件写入一个临时位置) commons-fileupload注意事项 使用commons-fileupload组件上传文件时需要在服务器上设置两类目录

文档评论(0)

精华文档888 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档