




























































































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!





























































































Number: 70- Passing Score: 800 Time Limit: 120 min File Version: 11.
Programming in HTML5 with JavaScript and CSS
Best stuff I have ever used for my exam preparation. I love Examcollection guys. This dump is definitely correct. Wow this looks like the new VCE file. Unbelievable that it had just been released, and now the questions are already available here Got this vce from my friend who passed with 98% , each and every stuff in it. I am sharing with you guys. More than 80% questions are from this dump :).
Exam A
QUESTION 1 You are creating a JavaScript function that displays the name of a web application.
You declare the following button element.
When a user clicks the button, a JavaScript function named About must be called.
You need to create an event handler that calls the About function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: CD Section: (none) Explanation
Explanation/Reference: Reference: http://help.dottoro.com/ljeuqqoq.php http://help.dottoro.com/ljinxrmt.php
QUESTION 2 You need to test the value of the following variable in JavaScript. var length = "75";
A block of code must execute if the length equals 75 regardless of the data type.
You need to use the statement that meets this requirement.
Which lines of code should you use? (Each correct answer presents a complete solution. Choose two.)
A. if (length = = = 75)
B. if (length = = 75)
C. if (length! = 75)
D. if (length = = "75")
Correct Answer: BD Section: (none) Explanation
Explanation/Reference:
You are developing an application that uses a third-party JavaScript library named doWork().
The library occasionally throws an "object is null or undefined" error with an error code of -2146823281.
The application must: Extract and handle the exceptions thrown by doWork() Continue normal program execution if other exceptions occur
You need to implement the requirements.
Which code segment should you use?
Reference: http://www.w3schools.com/html/html5_form_input_types.asp
You are developing a customer web form that includes the following HTML.
You need to change the HTML markup so that customers can enter only a valid three-letter country code.
Which HTML should you use?
A.
B.
C.
D.
Correct Answer: B Section: (none) Explanation
Explanation/Reference: Reference: http://www.w3schools.com/html5/att_input_pattern.asp
QUESTION 7 You are developing a web form that includes the following HTML.
You need to ensure that a value is entered into txtValue before the form is submitted.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A Section: (none) Explanation
Explanation/Reference:
You are creating a class named Sedan that must inherit from the Car class. The Sedan class must modify the inherited fourDoor () method. The Car class is defined as follows.
Future instances of Sedan must be created with the overridden method.
You need to write the code to implement the Sedan class.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: BC Section: (none) Explanation
Explanation/Reference:
You are modifying a blog site to improve search engine readability.
You need to group relevant page content together to maximize search engine readability.
Which tag should you use?
A.
B.
C.
D.
Correct Answer: B Section: (none) Explanation
Explanation/Reference: Reference: http://www.w3schools.com/tags/tag_article.asp http://www.w3schools.com/html/html5_new_elements.asp
QUESTION 10 You are developing application web form by using HTML5 and JavaScript.
You need to prevent users from submitting form data more than once.
Which code segment should you use?
The application must place a border on only the first UL element that is contained in the DIV element.
You need to update the webpage.
What should you do?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D Section: (none) Explanation
Explanation/Reference:
You troubleshoot a webpage that contains the following HTML element:
height= "300">Your browser does not support the HTML5 canvas. The following JavaScript code is included in a script tag in the HEAD section of the webpage: (Line numbers are included for reference only.)
You need to invoke the clickReporter() JavaScript function when a user clicks the mouse on the canvas HTML element.
What should you do?
A. Add the following attribute to the canvas HTML element: clicked= "clickReporter()"
B. Replace the code segment at line 06 with the following code segment: drawBox.Click += clickReporter;
C. Insert the following code segment at line 07: canvas.onclick = clickReporter;
D. Insert the following code segment at line 07: canvas, click = clickReporter;
Correct Answer: A Section: (none) Explanation
Explanation/Reference:
You are implementing an application by using HTML5 and JavaScript. A web page contains the following HTML table.
The application must: Identify all rows in the table body that have a class attribute of selected Exclude the last selected row in the table
You need to implement the web page according to the requirements.
Which CSS selector should you use?
A. tr:not(tr:last-child).selected < #dataTable
B. #dataTable > tr.selected:not(tr:last-child)
C. #dataTable tbody tr.selected:not(tr:last-child)
D. #dataTable tr.selected:not(tr:last-child)
Correct Answer: C Section: (none) Explanation
Explanation/Reference:
You create an application that sends information to a web service by using the following code: (Line numbers are included for reference only.)
The application uses the following code. (Line numbers are included for reference only.)
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?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B Section: (none) Explanation
Explanation/Reference:
An HTML page contains no embedded JavaScript or CSS code. The body of the page contains only the following line of code.
test
A CSS style sheet must be applied dynamically. The style must visibly change the appearance of the paragraph on the page. You need to apply a style the paragraph.
Which line of code should you use?
A. document.getElementById("test").style.border = "0";
B. document.getElementById("test").style.position = "static";
C. document.getElementById ("test").style.padding = "15px";
D. document.getElementById("test").style.top = "5px";
Correct Answer: A Section: (none) Explanation
Explanation/Reference: A: The border shorthand property sets all the border properties in one declaration.
The properties that can be set, are (in order): border-width, border-style, and border-color.
It does not matter if one of the values above are missing, e.g. border:solid #ff0000; is allowed.
QUESTION 19 You develop an HTML5 web application. The web application contains a form that allows users to enter only their month of birth.
The value that the users enter must be numbers between 1 and 12, inclusive.
You need to implement the form element for the month of birth.
Which element should you use?
A.
B.
C.
D.
Correct Answer: C Section: (none) Explanation
Explanation/Reference: Example:
QUESTION 20 You are developing an HTML5 web application for an architectural company that displays architectural blueprints.
The application must: Display the blueprints at different zoom levels without loss of detail Print the blueprints without loss of detail Work from only one source file per blueprint
You need to ensure that blueprints display according to the requirements.
Which HTML5 element should you use?
Correct Answer: C Section: (none) Explanation
Explanation/Reference: corrected.
You develop an HTML5 application that allows users to upload files from their local computers. The user interface must remain responsive during the upload.
You need to implement the file upload functionality for the application.
Which two actions should you perform? (Each correct answer presents a complete solution. Choose two.)
A. Use an HTML form with a file type INPUT element that targets a hidden IFRAME element.
B. Use a file type INPUT element, and then use the Web Storage API to upload the file.
C. Use a FormData object and upload the file by using XMLHttpRequest.
D. Register the file protocol by using protocol handler registration API and then upload the file by using XMLHttpRequest.
E. Use the FileSystem API to load the file, and then use the jQuery post method to upload the file to the server.
Correct Answer: A Section: (none) Explanation
Explanation/Reference:
You are creating a page that contains detailed employee information for a company portal. The page uses a jQuery library. The page contains a hidden button named btnEdit that is defined by the following code.
The heading tags represent a blog post title, a blog post subtitle, and the author's name. You need to ensure that the three headings are treated as a unit but retain their individual formatting.
Which tags should you use to wrap the H1, H2, and H3 elements?
A.
B.
C.
D.
Correct Answer: C Section: (none) Explanation
Explanation/Reference:
You develop a web application by using jQuery. You develop the following jQuery code: (Line numbers are included for reference only.)
The web application exposes a RESTful web API that has an endpoint of/product/create.
You need to create a new product by using AJAX.
Which code segment should you insert at line 05?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D Section: (none) Explanation
Explanation/Reference:
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?
Header (line 0), first line and third line.
You develop a webpage by using HTML5. You create the following markup:
You need to ensure that the value that the user enters contains a secure URL.
What should you do?
A. Add the following attribute to the input tag: value="https://v
B. Add the following attribute to the input tag: pattern="https://.+"
C. Add the following attribute to the input tag: value="ssl"
D. Add the following attribute to the input tag: itemtype="https"
Correct Answer: B Section: (none) Explanation
Explanation/Reference: Note:
The pattern attribute is supported in Internet Explorer 10, Firefox, Opera, and Chrome.
The pattern attribute specifies a regular expression that the element's value is checked against.
The pattern attribute works with the following input types: text, search, url, tel, email, and password
QUESTION 31 You develop a webpage by using HTML5. You create the following markup and code: (Line numbers are included for reference only.)
You need to ensure that the values that users enter are only numbers, letters, and underscores, regardless of the order.
Which code segment should you insert at line 04?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A Section: (none) Explanation
Explanation/Reference: Example: Sometimes situations arise when user should fill a single or more than one fields with alphabet characters (A-Z or a-z) in a HTML form. You can write a JavaScript form validation script to check whether the required field(s) in the HTML form contains only letters. - See more at: http://www.w3resource.com/javascript/form/all-letters-field.php#sthash.5Db50Bdm.dpuf
Javascript function to check for all letters in a field view plainprint?
function allLetter(inputtxt)
var letters = /^[A-Za-z]+$/; if(inputtxt.value.match(letters)) { return true; } else { alert("message"); return false; } }
To get a string contains only letters (both uppercase or lowercase) we use a regular expression (/^[A-Za-z]+$/) which allows only letters. Next the match() method of string object is used to match the said regular expression against the input value. Here is the complete web document.
QUESTION 32 You are creating an HTML5 application that allows users to play video on a page by using the VIDEO element.
You need to enable the user to start, stop, and pause the video.
Which line of code should you add to the page?
A.
B.
C.
D. You need to implement the loadStock function.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A Section: (none) Explanation
Explanation/Reference:
You are developing a web page that includes the following HTML.
Hello There!
The font color of text inside the span must be red.
You need to develop the web page to meet the requirement.
Which two CSS segments will achieve the goal? (Each correct answer presents a complete solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: AC Section: (none) Explanation
Explanation/Reference: Topic 4, Volume D
QUESTION 38 You are troubleshooting an application.
Users report that the UI is slow to respond.
You need to improve UI responsiveness by moving application tasks to web workers.
Which two tasks can you move to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. A function that loops through the Document Object Model to update the style of page elements
B. A long-running calculation that requires looping through an array
C. A function that performs graphic-intensive animation
D. A function that stores large amounts of data to local storage
Correct Answer: BC Section: (none) Explanation
Explanation/Reference: Note:
Despite the improvements in JavaScript engines, it is not uncommon for users to encounter frozen user interfaces as the browser works through resource intensive tasks. This leads to a horrible user experience. The purpose of Web Workers is to give developers a way of instructing the browser to process large tasks in the background; therefore preventing the UI from freezing up.
The Web Workers specification defines an API for spawning background scripts in your web application. Web Workers allow you to do things like fire up long- running scripts to handle computationally intensive tasks, but without blocking the UI or other scripts to handle user interactions
You develop an interactive scalable vector graphic (SVG) application.
You write the following code (Line numbers are included for reference only.):
You need to increase the size of the circle by 50 percent.
Which code segment should you insert at line 02?