70-480 Premium Bundle

70-480 Premium Bundle

Programming in HTML5 with JavaScript and CSS3 Certification Exam

4.5 
(22230 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 21, 2024Last update

Microsoft 70-480 Free Practice Questions

Q1. You develop a webpage that allows a user to download a 3PEG image and convert it to a PNG file. 

You need to implement the code to download the contents of the JPEG image with no additional decoding. 

Which JavaScript function should you use? 

A. readAsBinaryString() 

B. readAsArrayBuffer() 

C. readAsDataURL() 

D. readAsText() 

Answer:

Q2. You are creating a custom function. You pass an object named testObj to the function as a parameter. You do not use inheritance through the functions. 

The function must establish whether testObj inherits from another object named parentObj. 

You need to ensure that the function performs as required. 

Which method or operator should you add to the function? 

A. parentObj.instanceof(testObj) 

B. testObj.isPrototypeOf(parentObj) 

C. testObj.instanceof(parentObj) 

D. parentObj.isPrototypeOf(testObj) 

Answer: B

Q3. You are developing an application that uses a JavaScript library. The library contains the following functions. 

The library may throw many types of exceptions. The exceptions are grouped by category. 

You need to catch and identify the exceptions by group. 

Which code segment should you insert at line 05? 

[MISSING]

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q4. You develop an HTML5 webpage. You have the following HTML markup: 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: D

Q5. You are developing an HTML5 web application and are styling text. 

You need to use the text-transform CSS property. 

Which value is valid for the text-transform property? 

A. Capitalize 

B. Hidden 

C. Italic 

D. Line-through 

Answer:

Q6. You create an application that sends information to a web service by using the following code: (Line numbers are included for reference only.) 

When the web service returns a non-zero result code, you must raise an exception that contains the result code. 

You need to implement the code that generates the exception. 

Which line of code should you insert at line 04? 

A. CustomError .prototype = Error.prototype; 

B. CustomError ["ErrorType"] = Error; 

C. CustomError.customError = true; 

D. Error-constructor = CustomError; 

Answer:

Q7. You are developing a customer web form that includes the following HTML input field. 

<input id="txtValue"/> 

If a customer enters a value in the input field, then it must be a numeric value. 

You need to add validation to the input field. 

Which HTML should you use? 

A. <input id="txtValue" type-"text" pattern="/#" /> 

B. <input id="txtValue" type="number" /> 

C. <input id="txtVa!ue" type="integer" /> 

D. <input id="txtValue" type="text" required="required"/> 

Answer:

Q8. You are creating a JavaScript object that represents a customer. 

You need to extend the Customer object by adding the GetCommission method. 

You need to ensure that all future instances of the Customer object implement the GetCommission method. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: D

Q9. You are developing a web page that consumes a Windows Communication Foundation (WCF) service. The page includes the following code segment. 

var xhr = new XMLHttpRequest() ; 

The page uses the xhrHandler() method to listen for changes to the request status of the WCF service calls. It uses the xmlToJavaScript() method to convert the response from the WCF service to a JavaScript object. 

The xhrHandler() method must be called automatically each time the request status changes. 

You need to add the event handler to the request object. 

Which line of code should you use? 

A. xhr.onCallback = xhrHandler; 

B. xhr.onreadystatechange = xhrHandler; 

C. xhr.readyState = xhrHandler; 

D. xhr.status = xhrHandler; 

Answer:

Q10. You are developing an HTML5 page that includes several paragraph elements. 

You have the following requirements: . Add a drop shadow that is one inch below the text in the paragraph . Set the radius of the drop shadow to five pixels You need to style the paragraphs to meet the requirements. 

Which CSS style should you use? 

A. text-shadow: 72pt 0pt 5pt 

B. text-shadow: 5px lin 0px; 

C. text-shadow: 72pt 5em 0px 

D. text-shadow: 72pt 0em 5px; 

Answer:

Q11. You develop an HTML5 webpage. You have the following HTML markup: 

You need to add a background color to the first article in each section. 

Which code segment should you add to the webpage? 

A. $ ("section article:first-child").css("background-color", "#f2f2f2"); 

B. $ ("section:first-child").ess ( "background-color", "#f2f2f2"); 

C. $ ("article:first-of-type") .css("background-color", "#f2f2f2"); 

D. $ ("section:first-of-type").css("background-color", "#f2f2f2"); 

Answer: C

Q12. You develop an HTML5 webpage that contains the following HTML markup: 

You have the following requirements: 

. Retrieve the content for any OPTION elements when the value of the selected attribute equals selected. . Add the content to a comma separated string. 

You need to retrieve the required data. 

Which two code segments should you add to the webpage? (Each correct answer presents a complete solution. Choose two.) 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

Answer: BD

Q13. You develop an HTML5 application. You give users a numeric access code that can be used only one time. 

Users must enter the numeric access code in the login form of the application. The numeric characters must be hidden by a masking character. 

You need to implement the form element for users to enter the code. Which HTML element should you use? 

A. <input type="password" required autocomplete="off"> 

B. <input type="input" autocomplete="off" required /> 

C. <input type="password" stytem" visiblity:hidden;" required /> 

D. <input type="button" value="password" required /> 

Answer: A

Q14. You are developing an HTML5 web page. 

The appearance of the text box must change when a user moves the focus to another element on the page. 

You need to develop the page to respond to user action. 

Which line of code should you use? 

A. <input type="text" onblur="resetStyle(this);" /> 

B. <input type="text" onfocus="resetStyle(this);" /> 

C. <input type="text" onreset="resetStyle(this);" /> 

D. <input type="text" onselect="resetStyle(this);" /> 

Answer:

Q15. You are developing an HTML5 web application. The application loads data from a web service by using AJAX. The application displays the data by calling the displayData function. The data is loaded by using the following code. 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: B

START 70-480 EXAM