最新公告
  • 欢迎您光临99源码网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境!立即加入我们
  • Creating a Log-in Webpage The George Washington University Computer Science 1023 Professor Brenner (nbrenner@gwu.edu)

    Creating a Log-in Webpage The George Washington University Computer Science 1023 Professor Brenner (nbrenner@gwu.edu) 最后编辑:2021-05-14
    增值服务: 自动发货 使用说明 安装指导 环境配置二次开发BUG修复
    购买后自动跳转百度云,项目自提,轻松方便。
    若有个人部署运行问题,点击右侧客服按钮咨询站长

    项目介绍

    Creating a Log-in Webpage The George Washington University Computer Science 1023 Professor Brenner (nbrenner@gwu.edu)

    系统说明

    Creating a Log-in Webpage

    The George Washington University

    Computer Science 1023

    Professor Brenner (nbrenner@gwu.edu)

     

    For this laboratory assignment, you will create a web site for logging in.   The page must display two text boxen for the user to fill in; the first is to be labeled “Enter your user ID:” and the second “Enter your password:”.   (Arrange them neatly in an HTML table.)  Below both will be a button (not submit) button to transfer control to your Javascript function.   (Recall that a <form name=”someformname”> and </form> must surround these input controls and that text boxen must have name=”” options.)

     

    The Javascript function will check for and report one of three possible conditions:

     

    1. The user ID specified is not in a table of authorized users.
    2. The user ID is authorized, but the password is incorrect.
    3. Both the user ID and password are correct: a successful log-in.

     

    An array of user ID’s and passwords should be created in the Javascript code; three to five entries are sufficient for testing purposes.  These arrays need not be in a function, since they can be created as soon as the page is invoked.  When the correct condition of the three possible ones is determined, display an appropriate message.

    Optional enhanced version for advanced programmers

    Create a web site with two web pages.   The first is as described, but it has submit buttons to jump to the second webpage.  Also, the <form> has an additional clause: action=”URL”  The second webpage will have no HTML on it (except for a title or banner), and will consist entirely of Javascript.   This Javascript (not in a function, since it must run as soon as the page is invoked) will check for the conditions described above.

     

    The first thing that the second web page must do is retrieve the URL string pointing to itself.   This is done by:

     

    URLstring = window.location.href

     

    and it will look something like this (recall the lab on Yahoo and Bookfinder.com):

     

    webpage2.html?nameofbox1=valueinbox1&nameofbox2=valueinbox2

     

    This is a string, and the values that the user typed into the two text boxen must be extracted using the string handling methods described in the 2nd Javascript handout (posted in Blackboard under the title “Elements of Javascript II — Loops + Arrays”).  (Note the defining separators: the question mark at the beginning of the parameters, the ampersand which separates them, and the equals sign between the name and the value.) Those string values (for the user ID and the password) must be compared to the ones in the mini-array created in the 2nd web page.  (In a real application, the array of authorized user ID’s and their passwords will be kept externally, typically in an SQL database.)

     

    Steps for Creating the Log-in Lab

     

    1. (Basic lab) Fetch the user-entered information from the text boxes by the usual:

     

    userentry = formname.textboxname.value

     

    2 (Advanced lab).  Fetch the URL information into a string variable, as shown above for variable URLstring. Remember that the file name in the action= option of the <form> does not include the question mark or what comes after, as they are built by HTML when the Submit button is clicked.   And of course, the second webpage cannot reference the first webpage’s textboxes by the above type of statement.

     

    Use either .split or a combination of .indexOf and .substring to cut out the user-typed information (user ID and password) from the lengthy URLstring.  (Review the Blackboard-posted file about strings for details.)

     

    1. Insert frequent alert(variablename) statements so that you can track the progress of the Javascript program. Also, turn on the error console for your browser to see error messages.

     

    1. Create either:

     

    1. One array in which dictionary lookup of the user ID returns with the password string. E.g.

     

    dictusers=[]; dictusers[“username1”] = “password1”

     

    Or B. Two arrays, one holding authorized user ID’s and the other, in parallel with it, the corresponding passwords.  E.g.

     

    users = [“username1”, “username2”]; pws = [“pw1”, “pw2”];

     

    1. Check that the user-typed ID is in the authorized list. If using method 4A, do a dictionary lookup. E.g.  p = dictusers[whatwastypedinbox1]; the value of p will be equal to the variable (not the string!) undefined if what was typed is not in the dictionary, but will be the string of the corresponding password if it is in the dictionary.  If using method 4B, write a for loop to iterate thru the ID array, using an if statement to compare the typed-in value to each item in the array.

     

    1. If the user ID is found in the authorized list, then immediately check the typed-in password against the password corresponding to the ID in the array. If using method 4B, use the index value at which the match of ID’s was made as a subscript in the password array.

     

    1. Display a suitable message for whichever of the three conditions is true.Creating a Log-in Webpage The George Washington University Computer Science 1023 Professor Brenner (nbrenner@gwu.edu)

    适用场景:

    毕业论文课程设计、公司项目参考

    运行截图

    Creating a Log-in Webpage The George Washington University Computer Science 1023 Professor Brenner (nbrenner@gwu.edu) Creating a Log-in Webpage The George Washington University Computer Science 1023 Professor Brenner (nbrenner@gwu.edu)

    关注【程序代做 源码分享】公众号获取更多免费源码!!!

    Creating a Log-in Webpage The George Washington University Computer Science 1023 Professor Brenner (nbrenner@gwu.edu)

    猜你在找

    99源码网专注代写Java程序,php程序,网站建设,毕业设计,课程设计,代写C/C++程序,代写数据结构,代写ios android程序。除外还代做Web开发、Php网站开发、ASP.NET网站作业等。
    99源码网 » Creating a Log-in Webpage The George Washington University Computer Science 1023 Professor Brenner (nbrenner@gwu.edu)

    常见问题FAQ

    免费下载或者VIP会员专享资源能否直接商用?
    本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
    提示下载完但解压或打开不了?
    最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。若排除这种情况,可在对应资源底部留言,或 联络我们.。
    找不到素材资源介绍文章里的示例图片?
    对于PPT,KEY,Mockups,APP,网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。
    99源码网
    一个专注优质源码分享的平台
    • 2021-05-14Hi,初次和大家见面了,请多关照!

    发表回复

    售后服务:

    • 售后服务范围 1、商业模板使用范围内问题免费咨询
      2、源码安装、模板安装(一般 ¥50-300)服务答疑仅限SVIP用户
      3、单价超过200元的模板免费一次安装,需提供服务器信息。
      付费增值服务 1、提供软件定制、二次开发等服务请详询在线客服
      2、承接系统建站、仿站、开发、定制等服务
      3、服务器环境配置(一般 ¥50-300)
      4、网站中毒处理(需额外付费,500元/次/质保三个月)
      售后服务时间 周一至周日(法定节假日除外) 9:00-23:00
      免责声明 本站所提供的源码等资源仅供学习交流,若使用商业用途,请购买正版授权,否则产生的一切后果将由下载用户自行承担,有部分资源为网上收集或仿制而来,若模板侵犯了您的合法权益,请来信通知我们(Email: 3484724101@qq.com),我们会及时删除,给您带来的不便,我们深表歉意!

    Hi, 如果你对这款软件有疑问,可以跟我联系哦!

    联系作者
    • 6288会员总数(位)
    • 2223资源总数(个)
    • 0本周发布(个)
    • 0 今日发布(个)
    • 1684稳定运行(天)

    提供最优质的资源集合

    立即查看 了解详情