数据库a1.mdb中的数据表s1,含ID、name、pwd三个字段,能够正确输出当前记录的用户名(name)的语句是()。
第1题:
试题五(15 分)
阅读下列说明,根据网页显示的效果图,回答问题 1 至问题 6。
【说明】
以下是用 ASP 实现的一个网络留言系统。用 IE 打开网页文件“index.asp”后的效果如图 5-1 所示。
【index.asp 文档的内容】
<!--include file="conn.asp"-->
<html>
<head><title>留言系统</title></head>
<body>
<%Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From [message] order by id",Conn,1,1
if rs.eof and rs.bof then
(3) .write("<div align='center' class='bg'>没有留言</div>")
end if
i=1
do while (4)
%>
<table width="700" border="1" align="center" >
<tr>
<td height="30"><strong><%= (5) %></strong>
<%=rs("name")%> <%=rs("ip")%> <%=rs("time")%>
<a href="del.asp?del=<%=rs("id")%>" target="_parent">删除</a>
</td>
</tr>
<tr>
<td width="700" height="20"><%=rs("message")%></td>
</tr>
</table>
<%rs.movenext
i=i+1
loop
%>
<table width="700" border="0" align="center">
<tr>
<td><div align="left"><%=rs. recordcount%>条留言</div></td>
</tr>
</table>
<br />
<table width="704" border="0" align="center">
<tr>
<td width="311"><form. id="form1" name="form1" method="post" action="act.asp">
<table width="302" border="0">
<tr>
<td width="302"> 姓名 <input name="name" type="text" class="box"
id="name" size="15" /><p/>
验证码<input name='validatecode' type='text' class="box" size='5'>
<img src='imgchk/validatecode.asp' align='absmiddle' border='0'> </td>
</tr>
<tr>
<td>内容 (6) </td>
</tr>
<tr>
<td height="30"><input type=" (7) " name="tj" value=" 提交留言 " />
<input name="ip" type="hidden" id="ip" value= "<%=
Request.serverVariables("REMOTE_ADDR")%>" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<%rs.close %>
</body>
</html>
【问题 1】(2 分)
以下 (1) 属于 ASP.NET 创建的网页程序文件。
(1)A. index.asp B. index.htm C. index.aspx
【问题 2】(2 分)
HTML 文档中的<title>标签用于定义 (2) 。
(2)A. 修改标记 B. 显示标题 C. 元数据
【问题 3】(每空 1 分,共 5 分)
从以下备选答案内为程序中(3)~(7)处空缺选择正确答案,并填入答题纸对应的
解答栏内。
(3)A. request B. response C. application D. session
(4)A. rs.eof B. rs.bof C. not rs.eof D. not rs.bof
(5)A. i+1 B. rs.recordnumber C. rs.recordcount D. i
(6)
A. <table name="message" cols="40" rows="5" id="message"></table>
B. <textarea name="message" cols="40" rows="5" id="message"></textarea>
C. <input name="message" cols="40" rows="5" id="message"></input>
D. <img name="message" cols="40" rows="5" id="message"></img>
(7)A. submit B. text C. post D. radio
【问题 4】 (2 分)
另一个与程序中的语句“rs.eof and rs.bof”等价的语句是 (8) 。
【问题 5】 (2 分)
设置验证码的作用是 (9) 。
【问题 6】 (2 分)
rs.close 语句的作用是 (10) 。
(10)
A. 关闭数据库连接
B. 关闭当前网页
C. 关闭当前数据集
D. 关闭数据提交
第2题:
阅读下列说明,根据网页显示的效果图,回答问题1至问题7。
【说明】以下是用ASP实现了一个网络收藏夹网页,用于保存用户感兴趣的Web网页地址。用IE打开网页文件“index.asp”后的效果如图5-1所示。程序中使用的Access数据表结构如表5-1所示。
【index.asp文档的内容】
<%@LANGUAGE="VBSCRIPT" %>
<%
set conn=server. (5) ("Adodb.Connection")
provider = "Provider=Microsoft.Jet.OLEDB.4.0;"
path="Data Source=" & Server.MapPath("main.mdb"
connstr= provider & path
corm.open connstr
%>
<html>
<head><title>网络收藏夹</title></head>
(6)
<center>
<%
set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from address"
rs.open() sql,corm, 1,3
if Request("name") = "" or Request("url")="" then
Response.write ("内容填写不完整")
else
rs.addnew
rs(1) =request ("name")
rs(2) =request ("URL")
rs(3) =request ("category")
rs.update
end If
%>
<table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="FFCC00">
<tr><td>序号</td><td>名称</td><td>类别</td></tr>
<% rs.movefirst
for j=1 to rs. (7) %>
<tr>
<td><%=j%></td>
<td><a href="<%=rs("url")%>" target=" blank"><%=
rs("name")%></a></td>
<td><%=rs("category")%></td>
</tr>
<% rs.movenext
(8) %>
</table><br>
<form. action="index.asp" method="post" name="new" id="new">
<table width="300" border="1" cellpadding="0" cellspacing="0"
bordercolor="FFCC00">
<tr>
<rd width=" 61">名称</td>
<td width="223" align="left"><input name="name" type="text"
id="name" ></rd>
</tr>
<tr>
<td>超连接</td>
<rd align="left"><input name="URL" type="text" id="URL"></td>
</tr>
<tr>
<td colspan="2">类别</td>
</tr>
<tr>
<td colspan="2"><textarea name="category" rows="5" id="disc">
</textarea>
<br>*为必填项目</rd>
</tr>
</table>
<br>
(9)
</form>
<%
rs.close
conn.close
%>
</center>
</body>
</html>
ASP是(1)网页制作技术。
A.动态 B.静态
第3题:
从以下备选答案内为程序中(3)~(7)处空缺选择正确答案。(3)A.request B.response C.application D.session(4)A.rs.eof B.rs.bof C.notrs.eof D.notrs.bof(5)A.i+1 B.rs.recordnumber C.rs.recordcount D.i(6)A.<table name="message" cols="40" rows="5" id="message"></table> B.<textarea name="message" cols="40" rows="5" id="message"></textarea> C.<input name="message" cols="40"rows="5" id="message"></input> D.<IMG nClick=over(this)title=放大name="message"cols="40"rows="5"id="message"></IMG nClick=over(this)title=放大>(7)A.submit B.text C.post D.radio
第4题:
response.Write方法输出信息到浏览器,包括()、()、()的内容。
第5题:
要获得记录集RS中,当前记录的“产品型号”字段的值,该字段的顺序号为1,以下用法中,不正确的是()
Afdvalue=RS(1)
Bfdvalue=RS.Fields(“产品型号”)
Cfdvalue=RS.(“产品型号”)
Dfdvalue=RS.Fields(产品型号).Value
第6题:
该商务网站数据库中商品表的部分字段如下:
下面是后台修改商品页面的部分表单代码,请根据图和上述字段描述,确定(7)~(9)的表单类型,将答案填写在对应位置。
1.<input name="newsbook" type=" (7) " id="nb" value="1"
<%if rs1("newsbook")=1 then%>checked<%end if%>>
2.<input name="bm" type=" (8) id="bn" size="30" value="<%=rs1("bookname")%>">
3.<input type=" (9) " name="go" value="修 改" nClick="return check();">
第7题:
A.InsertIntousers(id,user_namE.Valuee(100,"luhong")提示:id字段类型自动编号,因此,用户不能赋值
B.InsertIntousers(real_name,tel)Valuee("卢红","6545632")提示:user_name是主键必须赋值,但未赋值。
C.InsertIntousers(user_name,Email)Valuee("luhong","")提示:Email不是必填字段,但应该赋NULL值
D.InsertIntousers(user_name,Email)Valuee("luhong",NULL)
第8题:
MySQL中用DROP语句可删除数据库和数据表,以下哪句是正确的语法?()
A、DROPTABLEtable_name1
B、DROPTABLEtable_name1,table_name2
C、DROPTABLEIFEXISTStable_name1
D、DROPDATABASEDBname1
第9题:
对于文件上传组件,下面()语句可以输出上传文件的大小。
第10题:
和response.write()语句等价的标记是()