《动态网页设计与制作》作业参考答案
一填空题
1.服务器、客户机、网络
2.A、文件链接、锚链接和邮件链接
3.FileSystem、TextStream、File、Folder
info是什么意思4.VBSCRIPT、JAVASCRIPT
5.Web浏览器、HTTP协议、HTTPrver、HTML文档、CGI程序
6.背景图案、背景色
7.有序列表、无序列表、定义列表、菜单列表、目录列表
8.文字的颜色、文字的大小
9.Framet、Frame
10.Connection、Command、Recordt
11.ADO、ADROTATOR
12.table、TR、TD
13.TCP/IP协议、服务器、客户机、网络
14.counters、unters、Content Rotator、trotator
15.Framet、Frame
16.ol、li
二简答题
1.内置对象:Request:获取客户端的信息、Respon:根据用户的请求,向客户端输出信息、Server:实现对服务器端的设置、Session:用于对某一特定的客户端信息进行记录和管理、Application:用于记录所有客户信息。
内置组件:广告轮显器用于广告轮换显示、文件存取组件用于文件操作。文件超链接组件用于超链接管理。
2.ADO主要由三个对象:Connection、Command和Recordt。Connection:主要用于数据库的链接;Command 对象借助于SQL命令对数据库进行操作,把操作结果返回Recordt对象;Recordt对象用于返回一个对数据库操作后的数据集合记录。
三个数据集合:Fields、Parameters、Errors;Fields数据集合用于字段的管理;Parameters用于确定在存贮命令中的参数;Errors数据集合包含因运行命令而引起的错误的详细内容。
3.与INTERNET的永久链接、IP地址和域名、服务器硬件、WEB服务器软件。
4.<html>
<body>
<framet rows="80,*" cols="312,*" >
<frame src="1.htm">
<frame src="2.htm" >
<frame src="3.htm">
<frame src="4.htm">
</framet>
</body>
</html>
5.Target属性用于控制被链接页面打开的方式,常见的取值有:_blank、_Self、_Parent和_top;_blank 表示被链接的文件在新窗口中打开、_Self表示被链接的文件在当前窗口中打开、_top表示被链接的文件在当前窗口中打开,并清除所有框架、_Parent表示被链接的文件在父框架中打开。
6.普通HTML文件、服务器端的程序代码、客户端的程序代码。
7.(1)客户与服务器建立TCP链接
obee(2)客户向服务器发送请求
(3)如果请求被接受,服务器就向客户发送响应信息,其中包括状态码和所要求的文件
(4)客户与服务器关闭链接
三综合题
1.post、output.asp、text、password、submit、ret、name、passw、urn、urp
2.global.asa、Vbscript、rver、onstart、0、
Onstart、Application(“Ur_Online”)+1、
onend、Application(“Ur_Online”)-1、Ur_Online
3.Sub Write()
for each x in Request.Cookies
respon.write("<p>")
Respon.Write(x & "=" & Request.Cookies(x) & "<br>")
respon.write "</p>"
next
end sub
4.<html>
<head>
<Title>插入数据记录</title>
</head>
<body>
<%
if request(“name”)=”” and request(“Passw”)=”” then
%>
<form name="form1" method=post action=a.asp>
用户名:
<input type=text name="name">
密 码:
<input type=text name="passw">
<input type=submit name="Submit" value="提交">
<input type=ret name="Submit" value="重填">
</form>
<%
el
name=request(“name”)
passw=request(“passw”)
Dim Db,Strconn
StrConn=”Dbq=”&rver.mappath(“Student.mdb”)&”Driver={Microsoft Access Driver(*.mdb)}”
Set ateobject(“tion”)
Db.open Strconn
Dim cmd
Set ateobject(“and”)
Set cmd.activeconnection=db
SqlStr=”inrt into student(name,passw) value(‘“&name &”’,’” &passw& ”’)”
巴克莱银行ute
db.clo
t db=nothing
end if
天使用英语怎么说%>
</body>
</html>
5.vbScript 、rver、CreateObject 、Scripting.FilesystemObject 、FileObj 、Textfile、FileObj 、FileSource、FileObject、TextFile
6. <html>
<head>
<Title>删除数据记录</title>
</head>
<body>
<%
if request(“name”)=”” then
%>
<form name="form1" method=post action=a.asp>
用户名:
<input type=text name="name">
<input type=submit name="Submit" value="提交">
<input type=ret name="Submit" value="重填">
</form>
副翼<%
el
<%
Dim Db,Strconn
StrConn=”Dbq=”&rver.mappath(“Student.mdb”)&”Driver={Microsoft Access Driver(*.mdb)}”
Set ateobject(“tion”)
Db.open Strconn
Dim cmd
多边形的面积
Set ateobject(“and”)
Set cmd.activeconnection=db
SqlStr=”delete from student where name=’” &name&”’ ”
rayon
db.clo
t db=nothing
respon.write “记录已删除”
end if
%>
</body>
</html>
7.<html>
<head>
<title>pagecounter组件</title>
</head>
<body>
<%
dim pageobj
Set ateobject("mswc.pagecounter")
pageobj.pagehit()
respon.Write(pageobj.hits())
%>
</body>
</html>
8.<html>
<head>
<title>修改记录</title>
</head>
<body>
<%
dim mylink,myrecordt
t mylink=rver.CreateObject("tion")
mylink.ConnectionString="driver={Microsoft access driver (*.mdb)};dbq="&rver.mappath("mydata.mdb")
mylink.open
t myrecordt=rver.CreateObject("dt")
myrecordt.CursorType = 0
myrecordt.CursorLocation = 1
myrecordt.LockType = 2
myrecordt.open "lect * from person where uname='peter'",mylink
韩语培训班while f
myrecordt("country")="中国"
myrecordt.update()
wend
myrecordt.clo()
mylink.clo()
respon.write(“记录已修改”)
她的二三事
%>
</body>
</html>
>be afraid of