阅读下列说明,根据网页显示的效果图,回答问题1至问题4,将解答填入对应的解答栏内。【说明】 以下是
阅读下列说明,根据网页显示的效果图,回答问题1至问题4,将解答填入对应的解答栏内。
【说明】
以下是用ASP实现的一个留言系统。用IE打开网页文件index.html后的效果如图5-1所示。
【index.html 文档的内容】
<html>
<head>
<title>留言系统</title>
</head>
<body>
<p align="center"><font color="006699">留言系统</font></p>
<form. method="post"action="submit.asp">
<table border="0"cellspacing="1"width="89%">
<tr>
<td>姓名: </td>
<td>< (2) name="name" size="30" maxlength="20"></td>
</tr>
<tr>
<td>性别: </td>
<td>< (3) name="sex" size="1">
<option selected>请选择你的性别</option>
<option value="男">男</option>
<option value="女">女</option>
</select></td>
</tr>
<tr>
<td><b>简短留言: </font></b></td>
<td>< (4) name=-content" rows="6" cols="45" ></textarea>
</td>
</tr>
<tr>
<td>< (5) name="submit"" value="提交留言"></td>
<td>< (6) name="B1" value="全部重填" ></td>
</tr>
</table>
</form>
</body>
</html>
【submit.asp 文档的内容】
<%
If request.form("name")=" " Then
response.write"<script>alert("请填写留言人性名!"); history.back()
</script>"
response.end
End If
If request.form("sex")=" " or request.form("sex")="请选择你的性别" Then
response.write"<script>alert "请选择留言人性别");history. back()
</script>"
response.end
End If
If len( (7) )>100 Then
response.write"<script>alert("争议不能超过100字!"); history. back()
</script>"
response.end
End If
%>
<!--include file="conn.asp" -->
<%
dim rs,sql
set rs=server. (8)
sql="select * from data where (id is null)"
rs.open sql,conn, 1,3
rs. (9)
rs("name")= (10)
rs("sex")=request.form("sex")
rs("content")=request.form("content")
rs("date")=now()
rs("ip")=request.ServerVariables("remote_addr")
rs. (11)
rs.close
conn.close
response.redirect"success.asp"
%>
将以上index.html更名为(1)后,将不能直接在IE中正常显示该网页。(1)A.index.htm
B.index.php C.index.asp
正确答案:(1)B(1)B 解析:考查IE解析网页的基本原理。IE可以正常解析后缀为.html和.htm的网页文件。同时,如果文件的后缀名为.asp,那么IE需要得到服务器对ASP文件的处理所得的HTML代码后,也可正常显示。本题中将普通.html文件改名为以.asp为后缀,显然其中不含 ASP程序,因此Ⅲ可正常显示。而IE无法显示后缀名为.php的文件。
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
