同源安全策略要求来自不同源的“document”或脚本只能读取或设置当前“document”的某些属性。

题目
判断题
同源安全策略要求来自不同源的“document”或脚本只能读取或设置当前“document”的某些属性。
A

B

参考答案和解析
正确答案:
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Two users share the same Windows 7 computer. The first user creates a document intended to be used by both users, and then logs off. The second user logs on and types the name of the document in the Start menu, but the document is not found. Which of the following is the problem?()

A. The document is set to hidden.

B. The document is locked.

C. The document was saved as a system document.

D. The document is owned by the first user.


参考答案:D

第2题:

在 Windows 系统中,设 E 盘的根目录下存在 document1文件夹,用户在该文件夹下己创建了 document2文件夹,而当前文件夹为 document1. 若用户将test.docx 文件存放 在 document2文件夹中,则该文件的绝对路径为( ) ;在程序中能正确访问该文件 且效率较高的方式为( )。

A.\document1\B.E:\document1\ document2C.document2\D.E:\document2\ document1A.\document1\ test.docxB.document1\ document2\test.docxC.document2\test.docxD.E:\document1\ document2\test.docx


正确答案:B,C

第3题:

【问题3】(5 分)

该网站购物车模块负面脚本语言是JavaScript,用户订购信息临时存在cookie中,下面是购物车页面中读取cookie值的函数,请完成该程序。

<script. language="javascript”>

……

function readCookie(name)

{

var cookieValue = ””;

var search= (8) +”=”;

if(document.cookie.(9)> 0)

start= document.cookie.indexOf(search);

if(start!=-1)

start += search.length;

end = document.cookie.indexOf(";”,start);

if(end = = -1)

end=document.cookie.length;

cookieValue = document.cookie.substring((10), (11))

return(12);

……

</script>


正确答案:
(8)name         (1分)
(9)length         (1分)
(10)start         (1分)
(11)end         (1分)
(12)cookieValue        (1分)

第4题:

根据同源安全策略,a.com网页中的脚本只能修改( )网页中的内容。

A.a.com
B.ab.com
C.b.com
D.be.com

答案:A
解析:
同源策略:限制来自不同源的"document"或脚本,对当前"document"读取或者设置某些属性。

第5题:

在Windows系统中,设E盘的根目录下存在document1文件夹,用户在该文件夹下已创建了document2文件夹,而当前文件夹为document1。若用户将test.docx文件存放在document2文件夹中,则该文件的绝对路径为(请作答此空);在程序中能正确访问该文件且效率较高的方式为( )。

A.\document1\
B.E:\documeml\document2
C.document2\
D.E:\document2\document1

答案:B
解析:
按查找文件的起点不同可以将路径分为绝对路径和相对路径。从根目录开始的路径称为绝对路径;从用户当前工作目录开始的路径称为相对路径,相对路径是随着当前工作目录的变化而改变的。
在Windows操作系统中,绝对路径是从根目录开始到文件所经过的文件夹名构成的,并以"\"开始,表示根目录;文件夹名之间用符号"\"分隔。按题意,"test.docx"的绝对路径表示为:E:\document1\document2。相对路径是从当前文件夹开始到文件所经过的文件夹名。编程时采用相对路径名document2\test.docx,不仅能正确地访问该文件而且效率也更高。

第6题:

在JavaScript中,document对象的哪个属性可返回当前文档的完整URL?()

A.domain

B.referrer

C.URL


答案:C

第7题:

在Windows系统中,设E盘的根目录下存在documentl文件夹,用户在该文件夹下已创建了document2文件夹,而当前文件夹为,document1。若用户将test.docx文件存放document2文件夹中,则该文件的绝对路径为( );在程序中能正确访问该文件且效率较高的方式为( )。

A.\document1\B.E:\document1\ document2C.document2\D.E:\document2\ document1A.\document1\test.docxB.document1\ document2\test.docxC.document2\test.docxD.E:\document1\ document2\test.docx


正确答案:B,C

第8题:

下面语法正确的是()

A.Document.bgcolor

B.Document.fgColor

C.Document.location

D.Document.open

E.Window.write


正确答案:ABC

第9题:

在Windows系统中,设E盘的根目录下存在document1文件夹,用户在该文件夹下已创建了document2文件夹,而当前文件夹为document1。若用户将test.docx文件存放在document2文件夹中,则该文件的绝对路径为( );在程序中能正确访问该文件且效率较高的方式为(请作答此空)。

A.\document1\test.docx
B.document1\document2\test.docx
C.documem2\test.docx
D.E:\document1\document2\test.docx

答案:C
解析:
按查找文件的起点不同可以将路径分为绝对路径和相对路径。从根目录开始的路径称为绝对路径;从用户当前工作目录开始的路径称为相对路径,相对路径是随着当前工作目录的变化而改变的。
在Windows操作系统中,绝对路径是从根目录开始到文件所经过的文件夹名构成的,并以"\"开始,表示根目录;文件夹名之间用符号"\"分隔。按题意,"test.docx"的绝对路径表示为:E:\document1\document2。相对路径是从当前文件夹开始到文件所经过的文件夹名。编程时采用相对路径名document2\test.docx,不仅能正确地访问该文件而且效率也更高。

第10题:

在Windows系统中,设E盘的根目录下存在document1文件夹,用户在该文件夹下创建了document2文件夹,则当前文件夹为document1. 若用户将test.docx文件存放在document2文件夹中,则该文件夹的绝对路径为(上题)。在程序中能够正确访问该文件且效率较高的方式为(本题)

A.\document1\test.docx
B.document1\document2\test.docx
C.document2\test.docx
D.\document1\document2\test.docx

答案:C
解析:

更多相关问题