a._HTML与Javascript考试答案
- 格式:doc
- 大小:74.00 KB
- 文档页数:5
HTML与Javascript考试题(答题时间:60分钟)1.基础知识(每空5分,共60分)1.1 现有一页面的meta部分,请完成下面题目<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />gb2312<meta http-equiv="Content-Language" content="zh-CN" /><meta http-equiv=“refresh” content=“5; url=/” /><meta name="author" content="Csdn" /><meta name="Copyright" content="Csdn" /><meta name="description" content="csdn" /><meta content="csdn" name="keywords" /></head>a.当前页面的编码为_______utf-8_______。
b.页面载完后,会自动跳转到_________________。
c.当页面meta信息中没有提供页面编码时,还可以通过_____IE查看编码______来查看页面编码。
1.2 现有一段javascript代码,请完成下面题目function gotoAnyNodeSubmit(unid){var pathname = (window.location.pathname);百度去// var pathname :bhgc / dep36/swgl_36.nsf/vwDocByDate/82E374DBC489ACA248257474000E7532pathname = pathname.substring(0,(stIndexOf('.nsf')+5));//pathname 17+5=22Pathname = pathname.substring(0,24);window.location.href= pathname +'agtGotoAnyNode?Openagent&unid='+unid;}a.在javascript中substring的作用是___________截取字符串_____________,str.substring(1,4)表示的意思为_______从开始位置为1截取到结束位置为4的字符串____。
b.假设当前页面地址如下:/bhgc/dep36/swgl_36.nsf/vwDocByDate/82E374DBC489ACA248257474000E7532?editdocument,参数unid为1,在触发上面javascript函数之后页面会跳转到_____/bhgc/dep36/swgl_36.nsf/agtGotoAnyNode?Openagent&unid=1_ ____。
1.3 请写出下面实体名称对应的现实结果?@amp;&" “&quos …>>< <a.&对应结果为_______&__________b."对应结果为_______”__________2.综合应用(每题20分,共40分)2.1 现有一段HTTP Header信息,请描述这个HTTP请求过程?POST/bhgc/dep36/fwgl_36.nsf/vwDocByDate/c9e25e4f88d96f87482574740016b018?EditDocument&Count=2 0&Seq=1 HTTP/1.1Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument,application/xaml+xml, application/x-silverlight, application/x-silverlight-2-b1, */*Referer:/bhgc/dep36/fwgl_36.nsf/vwDocByDate/C9E25E4F88D96F87482574740016B018 ?editdocument&Count=20Accept-Language: zh-cnContent-Type: application/x-www-form-urlencodedUA-CPU: x86Accept-Encoding: gzip, deflateUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322;InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MS-RTC LM 8) Host: Content-Length: 2571Connection: Keep-AliveCache-Control: no-cacheCookie: myusername=csbmld; pwd=password; (用户名、密码)LtpaToken=AAECAzQ4Njg0NjRCNDg2OTAxQ0JDTj0TsuITytQTsr8Tw8UTwewTtbwvTz1iaGdjR5iaDHVK7cTANbf 6TYjrKuTgsbo=;BookMark=http%3A///bhgc/dep36/fwgl_36.nsf/vwDocByDate/C9E25E4F88D96F8748257 4740016B018%3Feditdocument%26Count%3D20__Click=0&%25%25ModDate=482574740016B260&dbPath=bhgc%2Fdep36%2Ffwgl_36.nsf&appName=bhgc&a ppPath=bhgc&hfldForceClearLock=0(参数)HTTP/1.1 302 FoundServer: Lotus-DominoDate: Mon, 30 Jun 2008 03:06:26 GMTConnection: closeLocation:/bhgc/dep36/fwgl_36.nsf/frmSubmitPage?openform&unid=C9E25E4F88D96F87 482574740016B018&node=2&seluser=yesContent-Language: zh-cnGET/bhgc/dep36/fwgl_36.nsf/frmSubmitPage?openform&unid=C9E25E4F88D96F87482574740016B018&node =2&seluser=yes HTTP/1.1Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-silverlight, application/x-silverlight-2-b1, */* Referer:/bhgc/dep36/fwgl_36.nsf/vwDocByDate/C9E25E4F88D96F87482574740016B018 ?editdocument&Count=20Accept-Language: zh-cnUA-CPU: x86Accept-Encoding: gzip, deflateUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MS-RTC LM 8) Host: Connection: Keep-AliveCache-Control: no-cacheCookie: myusername=csbmld; pwd=password;LtpaToken=AAECAzQ4Njg0NjRCNDg2OTAxQ0JDTj0TsuITytQTsr8Tw8UTwewTtbwvTz1iaGdjR5iaDHVK7cTANbf 6TYjrKuTgsbo=;BookMark=http%3A///bhgc/dep36/fwgl_36.nsf/vwDocByDate/C9E25E4F88D96F8748257 4740016B018%3Feditdocument%26Count%3D20HTTP/1.1 200 OKServer: Lotus-DominoDate: Mon, 30 Jun 2008 03:06:26 GMTLast-Modified: Mon, 30 Jun 2008 03:06:24 GMTExpires: Tue, 01 Jan 1980 06:00:00 GMTContent-Type: text/html; charset=GB2312Content-Length: 14878Content-Language: zh-cnCache-control: no-cache答:1、Post到一个地址…,post了数据,设置了cookie2、返回302跳转到。