[试题]

阅读下列说明,根据网页显示的效果图,回答问题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" class="text" 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" class="text"></textarea>

</td>

</tr>

<tr>

<td>< (5) name="submit'' class="btn" value="提交留言"></td>

<td>< (6) name="B1" value="全部重填" class='!btn"></td>

</tr>

</table>

</form>

</body>

</html>

(submit.asp 文档的内容)

<%

If request.form("name")=" " Then

response.write"<script>alert('请填写留言人性名!'); history.back()

</script>"

response.end

E.nd If

If request.form("sex")=" " or request.form("sex")="请选择你的性别" Then

response.write"<script>alert '请选择留言人性别');history. back()

</script>"

response.end

E.nd If

If len( (7) )>100 Then

response.write"<script>alert('争议不能超过100字!'); history. back()

</script>"

response.end

E.nd 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至问题4,将解答填入对应的解答栏内