网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

在 Web 服务器端有一个表单文件如下:

<html>

<head><title>check</title></head>

<body>

<form. action=”check.jsp” method=”post”>

Please input your name and password:<br>

username: <input type=”text” name=”username”><br>

password: <input type=”password” name=”usrpwd”><br>

<input type=”submit” name=”confirm” value=”confirm”>

</form>

</body>

</html>

现在需要在 check.jsp 文件中实现如下功能:对用户输入的用户名和密码进行检查,如果合法,则在网页中

直接输出字符串”login success”;如果不合法,则直接在网页中输出字符串”login failure”;假定该网站的用户

信息被保存在数组 s[]={”jack”,”jack2006”}中,s[0]为用户名,s[1]为用户密码。请问 check.jsp 应该如何利用

脚本实现上述功能,写出完整的程序代码。不考虑用户输入中文字符的情况。

提示:可调用字符串自带的 equals()方法进行合法的用户名和密码与用户输入参数的比较。


参考答案

更多 “ 在 Web 服务器端有一个表单文件如下:htmlheadtitlecheck/title/headbodyform. action=”check.jsp” method=”post”Please input your name and password:brusername: input type=”text” name=”username”brpassword: input type=”password” name=”usrpwd”brinput type=”submit” name=”confirm” value=”confirm”/form/body/html现在需要在 check.jsp 文件中实现如下功能:对用户输入的用户名和密码进行检查,如果合法,则在网页中直接输出字符串”login success”;如果不合法,则直接在网页中输出字符串”login failure”;假定该网站的用户信息被保存在数组 s[]={”jack”,”jack2006”}中,s[0]为用户名,s[1]为用户密码。请问 check.jsp 应该如何利用脚本实现上述功能,写出完整的程序代码。不考虑用户输入中文字符的情况。提示:可调用字符串自带的 equals()方法进行合法的用户名和密码与用户输入参数的比较。 ” 相关考题
考题 详细阅读下面的FORM. 表单和PHP代码。当在表单里面的两个文本框分别输入’php’和’great’的时候,PHP代码将在页面中打印出什么?( )form. action=’index.php’ method=’post’input type=’text’ name=’element[]’input type=’text’ name=’element[]’input type=’submit’ value=’提交’/formIndex.php 代码如下:?phpif(A.什么都没有B.AarryC.一个提示D.phpgreat

考题 ● 语句(43)用于在HTML表单中添加默认选中的复选框。(43)A. input type=radio name=s checkedB. input type=radio name=s enabledC. input type=checkbox name=s checkedD. input type=checkbox name=s enabled

考题 在网页中创建一个如下图所示的表单控件的HTML代码是(50)。A.<input type="text" name="T1" size="20">B.<textarea rows="1" name="T1" cols="20"></textarea>C.<input type="radio" value="T1" checked name="R1">D.<select size="1" name="T1"></select>

考题 从以下备选答案内为程序中(5)~(9)处空缺部分选择正确答案。(5)A.CreatObject B.Connect C.ExecuteSQL D.Open()(6)A.<body> B.<html> C.<head> D.<table>(7)A.number B.recordnumber C.count D.recordcount(8)A.skip B.end for C.next D.loop(9)A.<input type="submit" name="add" value="添加">B.<input type="post" name="add" value="添加">C.<input type="submit" name="添加" value="add">D.<input type="post" name="添加" value="add">

考题 语句(43)用于在HTML表单中添加默认选中的复选框。A.B. 语句(43)用于在HTML表单中添加默认选中的复选框。A.<input type=radio name=s checked>B.<input type=radio name=s enabled>C.<input type=checkbox name=s checked>D.<input type=checkbox name=s enabled>

考题 在网页中创建一个如下图所示的表单控件的HTML代码是______ 。A.<input type=“text”name=“T1” size=“20”>B.<textarea rows=“1”name=“T1” cols=“20”></textarea>C.<input type=“radio”value=“T1”checked name=“R1”D.<select size=“1”name=“T1”></sclect>

考题 下图是HTML文件submit.html在IE中的部分显示效果。请完成下面submit.html中部分html代码。<form. action=/cgi-bin/post-query method=POST>您的姓名:<input type=text name=姓名><br>您的主页的网址:<input type= text name=网址value=http://><br>密码:<input type= (44) name=密码><br><input type=submit value=“发送”><input type= (45) value=“重设”></form>(44)A.textB.passwordC.passwdD.key

考题 ● 下图是HTML文件submit.html在IE 中的部分显示效果。请完成下面submit.html中部分html代码。form. action=/cgi-bin/post-query method=POST您的姓名:input type=text name=姓名br您的主页的网址:input type=text name=网址 value=http://br密码:input type=(44) name=密码brinput type=submit value="发送"input type=(45) value="重设"/form(44)A. textB. passwordC. passwdD. key(45)A. sendB. resetC. restartD. replace

考题 请根据网页显示的效果图(如图12-4所示),将HTML文本中(n)处解答填于纸相应的解答栏内。<html><head><!-- TcmplateBeginEditable name="doctitle" --><title>论坛登录注意事项</title><!-- TemplateEndEditable --><meta. http-equiv="Content-Type" content="text/html; charset=-gb2312"><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --><1-- TemplateParam name="Header" type="boolean" value="tme" --><!-- TemplateParam name="this" type="boolean" value="tme" --><!-- TemplateParmn name="UserName" (1) value="textfieldl"--><!-- TemplateParam name="Password" type="text" value="textfieldl" --><!-- TemplateParam name="ButtonName" type="text" value="Submit" --><!-- TemplateParam name="ButtonLabel" type="text" value="Sign In" --><!-- TemplateParam name="FormAction" type="text" value="" --><!-- TemplateParam name="FormMethod" type="text" value="post" --><!-- TemplateParam name="FormName" type="text" value="forml" --><style. type="text/css"><!--.stylel {font-size: 36px;font-weight: bold;}--></style></head><body class="sub"><div align="center"><span class="style1 ">论坛登录注意事项</span><br></div><formame="@@(FormName)@@method="@@(ForrnMethod) @@"action="@@(FormAetion) @@,,><table width="85%" border="0" cellspacing="0" cellpadding="1" class="TitleColor"><tr style="vertical-align: top"><td> <table width="100%" height="290" border="1" cellpadding="4" cellspacing="0"><tt class="HeaderColor"><td width="175" style="vertical-align: top"><!-- TemplateBeginEditable name="Title" --><h3 align="center">论坛登录</h3><!-- TemplateEndEditable --></td><td width="437" style="vertical-align: top"><!-- TemplateBeginIf eond="Header" --><!-- TemplateBeginEditable name="Title2" --><h3 align=(2)>注意事项</h3><!-- TemplateEndEditable --><!-- TemplateEndlf--></td></tr><tr style="vertical-align: top"><td height="230" class="TitleColor"><!-- TemplateBeginEditable name="Title3"--><label for="usemame"><strong>用户名称</strong></label><!-- TemplateEndEditable --><br><input id="usemame" name="usemame"type="text"(3)><p> </p><!-- TemplateBeginEditable name="Title4" --><label for="password"><strong>用户密码<input id="password3" name="password" type="password" size="25"></strong></label><!-- TemplateEndEditable --><div align="right"><strong>&nbs

考题 某留言系统采用ASP+Access开发,其后台管理登录页面如图4-1所示。图4-1【问题1】(9分)以下是该后台管理登录页面login.asp的部分代码,请仔细阅读该段代码,根据图4-1 将(1)~(9)的空缺代码补齐。!--include file=“conn.asp”--!--include file=“md5.asp”--!--include file=“bbb.asp”--%If request.Form(“submit”)=“管理登录”Thenuser_name = request.Form(“ (1) ”)password = request.Form(“ (2) ”)verifycode = request.Form(“ (3) ”)If user name =“” ThenCallinfoback(“用户名不能为空!”)End If......Set (4) = server. CreateObject(“adodb.recordset”)sql = “select * from administrator (5) user_name = “user_name”andpassword = “md5(password)””rs.Open (6) ,conn,1,1If (7) rs.EOF Thensession(“user_name”)= user_nameresponse.redirect“information.asp”ElseCall infoback(“用户名或密码错误!”)End IfEnd If%html ......bodyform. method=“post”action=“login.asp”id=“login”hl管理员登录/hllabel for=“user_name”用户名:input name=“user_name” type=“text” class=“user_name” id=“uname” size=“25”//labellabel for=“password“密码:input name=“password”type=“password”id=“pword” size=“25”//labellabel for=“verifycode”验证码:input name=“verifycode” type=“text” class=“verifycode” id=“vcode” size=“10”maxlength=“4”/img src=“code.asp” nclick=“javascript.:this.src=‘code.asp?tm=’+Math.random()”style=“cursos:pointer” alt=“点击更换” title=“点击更换”//labelp class=“center”input name=“reset”type=“ (8) ” class=“submit” value=“清除数据”/input type=“ (9) ” name=“submit” class=“submit”value=“管理登录”//p/form/body/html(1)~(9)备选答案如下:A.pword B.where C.uname D.vcode E.resetF.submit G.rs H.sql I. Not

考题 某 html 文档中有如下代码,则在浏览器中打开该文档时显示为( )。 form Listl: input type=text name=List1 / br / List2: input type=text name=List 2 / /formA.B.C.D.

考题 阅读以下关于网页制作和网页编程的说明,回答问题1至问题4。某公司电子商务网站首页如下图所示。网页制作使用了CSS技术,CSS文件style.css位于发布目录c:\website下的css目录中。下面给出首页的部分代码。<html>< (1) ><title>找东东网—找我喜欢!</title><link (2)=”stylesheet”(3)=”text/css” href=”(4)”/></head><body><form. name=searchinfo method=post nclick=”chkuser.asp”><input name=”textfield” type=”(5)”(6)=”请输入搜索项目” size=”70”maxlength=”50”/><input type=”submit” name=”submit” value=”搜索” /></form><form><input name=”mobile” type=”radio” value=”移动”(7)/>移动<input name=“unicom” type=”radio” value=”联通” />联通<input name=”smart” type=”radio”value=”小灵通”/>小灵通</form>……省略部分代码</body></html>请将上述HTML代码中空缺的部分补充完整。

考题 在网页中创建如下图所示的表单控制的HTML代码是______。A.性别:<input name="rbsex"type="radio"value="男"checked="cbecked"/>男<input name="rbsex"type="radio"value="女"/>女B.性别:<input name="rbsex"type="radio"value="男"checked="checked"/>男<input name="rbsex"type="checkbox"value="女"/>女C.性别:<input name="rbsex"type="checkbox"value="男"checked="checked=">男<input name="rbsex"type="radio"value="女"/>女D.性别:<input name="rbsex"type="checkbox"value="男"checked="checked=">男<input name="rbsex"type="checkbox"value="女"/>女

考题 在HTML页面中,定义了如下的Javascript函数,则正确调用该函数的HTML代码是()  function compute(op){  alert(op);  }A、input name=”a” type=”button” onclick=”compute(this.value)” value=”+” B、input name=”b” type=”button” onclick=”compute(‘-‘)” value=”-” C、input name=”c” type=”button” onclick=”compute(“*”)” value=”*” D、input name=”d” type=”button” onclick=”compute(/ )” value=”/”

考题 在页面中看不见的表单元素是那种?()A、input type="password"/input B、input type="radio"/inputC、input type="hidden"/input D、input type="reset"/input

考题 在HTML页面中包含一个按钮控件mybutton,如果要实现点击该按钮时调用已定义的Javascript函数compute,要编写的HTML代码是()。A、〈input name=“mybutton” type=“button” onBlur=“compute()” value=“计算”〉B、〈input name=“mybutton” type=“button” onFocus=“compute()” value=“计算”〉C、〈input name=“mybutton” type=“button” onClick=“functioncompute()” value=“计算”〉D、〈input name=“mybutton” type=“button” onClick=“compute()” value=“计算”〉

考题 要在表单中添加提交按钮,实现在用户单击“提交”按钮时,自动将表单提交道ACTION属性中指定的位置。下列语句正确的是()。A、FORM  METHOD=”POST” ACTION=http://www.xmission.com INPUT TYPE=”button” VALUE=”提交”NAME=“b1”/FORM B、FORM  METHOD=”POST” ACTION=http://www.xmission.com INPUT TYPE=”reset” VALUE=”提交”NAME=“reset1”/FORM C、FORM  METHOD=”POST” ACTION=http://www.xmission.com INPUT TYPE=”submit” VALUE=”提交”NAME=“submit1”/FORMD、 FORM  METHOD=”POST” ACTION=http://www.xmission.com INPUT TYPE=”submit” VALUE=”提交”NAME=“b1”/FORM

考题 增加列表框的HTML代码是()A、input type=submit/input B、textarea name="textarea"/textarea C、select multiple/select   D、input type=checkbox/input

考题 属性选择器语法格式不正确的是()。A、input[type="text"]{background:red;}B、input{type="text"}{background:red;}C、input[type=password]{background:red;}D、input[type=’password’]{background:red;}

考题 下面哪种方法可以设置单行文本框的默认值为“在这里输入用户名”?()A、〈input type=’text’ name=’txtUserId’ value=’在这里输入用户名’〉B、〈input type=’text’ name=’txtUserId’〉在这里输入用户名〈/input〉C、〈textarea type=’memo’ name=’txtUserId’ value=’在这里输入用户名’〉D、〈textarea type=’memo’ name=’txtUserId’〉在这里输入用户名〈/textarea〉

考题 以下Form表单元素描述,()是错的。A、〈input type="password"〉表示密码框B、〈input type="reset"〉表示提交按钮C、〈select name="radio"〉表示单选框D、〈input type="text"〉表示文本框

考题 增加表单的多行文本域的HTML代码是()。A、input type=submit/inputB、textarea name="textarea"/textareaC、input type=radio/inputD、input type=checkbox/input

考题 增加表单的密码域的HTML代码是()A、input type=submit B、input type=password C、input type=radio D、input type=checkbox

考题 在表单中包含性别选项,且默认状态为“男”被选中,下列正确的是()。A、input type=radio name=sex checked男B、input type=radio name=sex enabled男C、input type=checkbox name=sex checked男D、input type=checkbo xname=sex enabled男

考题 单选题以下Form表单元素描述,()是错的。A 〈input type=password〉表示密码框B 〈input type=reset〉表示提交按钮C 〈select name=radio〉表示单选框D 〈input type=text〉表示文本框

考题 单选题在HTML页面中包含一个按钮控件mybutton,如果要实现点击该按钮时调用已定义的Javascript函数compute,要编写的HTML代码是()。A 〈input name=“mybutton” type=“button” onBlur=“compute()” value=“计算”〉B 〈input name=“mybutton” type=“button” onFocus=“compute()” value=“计算”〉C 〈input name=“mybutton” type=“button” onClick=“functioncompute()” value=“计算”〉D 〈input name=“mybutton” type=“button” onClick=“compute()” value=“计算”〉

考题 单选题增加表单的多行文本域的HTML代码是()。A input type=submit/inputB textarea name=textarea/textareaC input type=radio/inputD input type=checkbox/input