[Free] Get all latest Microsoft 98-375 Actual Tests 41-50

Ensurepass

QUESTION 41

Which three components define the URL used for localStorage data in HTML5? (Choose three.)

 

A.

scheme

B.

user credentials

C.

hostname

D.

unique port

E.

query

 

Correct Answer: ACD

Explanation:

localStorage is also the same as globalStorage[location.hostname], with the exception of being scoped to an HTML5 origin (scheme + hostname + non-standard port) and localStorage being an instance of Storage.

 

HTML5 local storage saves data in string form as key-value pairs. If the data you wish to save is not string data, you are responsible for conversion to and from string when using LocalStorage.

 

 

QUESTION 42

DRAG DROP

Match the JavaScript objects to the corresponding characteristics or methods. (To answer, drag the appropriate JavaScript object from the column on the left to its characteristic or method on the right. Each JavaScript object may be used once, more than once, or not at all. Each correct match is worth one point.)

 

clip_image002

 

Correct Answer:

clip_image004

QUESTION 43

Which two code segments declare JavaScript functions? (Choose two.)

 

A.

varfunct= (a);

B.

function Foo(a){

}

C.

var a=new Foo();

D.

Foo=function(a){

…}

 

Correct Answer: CD

Explanation:

Example:

function add(x, y) {

return x + y;

}

var t = add(1, 2);

alert(t); //3

 

Example:

//x,y is the argument. ‘returnx+y’ is the function body, which is the last in the argument list.

var add = new Function(‘x’, ‘y’, ‘return x+y’);

var t = add(1, 2);

alert(t); //3

 

Incorrect:

Not A: funct keyword not used in JavaScript

 

 

QUESTION 44

You add script tags to an HTML page. You need to update the text value within a specific HTML element. You access the HTML element by id. What should you do next?

 

A.

Use the createTextNode method.

B.

Use the appendChild method.

C.

Set the new text value with the setAttribute method.

D.

Use the firstChild property and set the new text value with the nodeValue property.

 

Correct Answer: D

 

 

QUESTION 45

You create an instance named “location” of a geolocation object. Which code fragment will initiate periodic updates of a device’s geographic location?

 

A.

location = navigator.geolocation;

B.

location.watchPosition(showLocation) ;

C.

location.getCurrentPosition(showLocation);

D.

location.clearNatch(watchid);

 

Correct Answer: B

 

 

QUESTION 46

You need to use JavaScript to access the “section1” element in the following code fragment:

 

<div id=’section1′>

 

Which method should you use?

 

A.

getElementsByTagName

B.

getElementById

C.

getElementsByName

D.

getElementsByClassName

 

Correct Answer: B

 

 

QUESTION 47

Which three properties can be used with the TouchEvent object in the Safari touch API? (Choose three.)

 

A.

offsetTop

B.

clientHeight

C.

scale

D.

touches

E.

rotation

 

Correct Answer: CDE

 

 

QUESTION 48

DRAG DROP

Match the touch events to the corresponding actions. (To answer, drag the appropriate touch event from the column on the left to its action on the right. Each touch event may be used once, more than once, or not at all. Each correct match is worth one point.)

 

clip_image006

 

Correct Answer:

clip_image008

 

 

QUESTION 49

Which three statements describe cookies? (Choose three.)

 

A.

They can be created, read, and erased using the document.cookie property.

B.

They are limited in size to 5 MB.

C.

They are deleted automatically when the session ends.

D.

They can be used only by pages on the domain where they were set.

E.

They contain the data in the form of a name=value pair.

 

Correct Answer: ADE

Explanation:

Note:

Cookies are small, usually randomly encoded, text files that help your browser navigate through a particular website. The cookie file is generated by the site you’re browsing and is accepted and processed by your computer’s browser software. The cookie file is stored in your browser’s folder or subfolder.

 

 

QUESTION 50

Which two terms represent interfaces in the File API? (Choose two.)

 

A.

Font

B.

Blob

C.

Keygen

D.

FileList

 

Correct Answer: BD

Explanation:

The File Interface

This interface describes a single file in a FileList and exposes its name. It inherits from Blob.

 

IDL

 

[Constructor(Blob fileBits, [EnsureUTF16] DOMStringfileName)] interface File : Blob {

 

readonly attribute DOMString name;

readonly attribute Date lastModifiedDate;

 

};

 

Instant Access to Download Testing Software & PDF File for Microsoft 98-375 Real Exam

Instant Access to Try Microsoft 98-375 Free Demo