








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









Since a page can contain multiple web forms, JavaScript organizes the forms into _____ object collection. - answer ✅✅document.forms[idref] Which of the following expressions can be used to reference a form element using its name or id attribute? - answer ✅✅form.elements.ename; Identify the input field property or method that can be used to remove the focus from the input box. a. input.focus() b. input.pattern c. input.blur() d. input.required - answer ✅✅input.blur()
Identify the input field property or method that can be used to return the current value displayed in the input box. - answer ✅✅input.value Which of the following selection list properties returns true if more than one option can be selected from the list? - answer ✅✅select.multiple _____ is a selection list property that returns the number of options displayed in the selection list. - answer ✅✅select.size Identify the options object collection in which the selection list options are organized. - answer ✅✅select.options[idref] Identify the description of the option.selected property. - answer ✅✅It returns true if the option has been selected by user. Radio buttons are grouped by a common field name placed within the _____ array. - answer ✅✅options[idref] The _____ property returns a Boolean value indicating whether the option button, option, is currently checked by a user. - answer ✅✅option.checked Which of the following CSS selector returns the option button that is checked within the protection field? - answer ✅✅input[name="protection"]:checked
Identify the method associated with browser locations that can find the protocol, hostname, and port number of the URL. - answer ✅✅location.origin Which of the following location methods returns the href portion of the location's URL? - answer ✅✅location.toString() Identify the object constructor that can be used to create a text string explicitly. - answer ✅✅stringVar = new String(var); Which of the following methods can be used to reference a character at the index i of the string? - answer ✅✅string.charAt(I) Which of the following methods can be used to extract longer text strings? - answer ✅✅string.slice(start [,end]) Identify the method that can be used to create an array of substrings. - answer ✅✅strArray = string.split(str) Identify the use of string.indexOf(str [,start])method. - answer ✅✅To search for the occurrence of a substring within larger text strings Regular expressions have the general form denoted as _____. - answer ✅✅/pattern/ Identify the action for which the g flag is added at the end of the regular expression /pattern/. - answer ✅✅To perform a global search
Identify the description for the \b character type. - answer ✅✅A word boundary Which of the following character types is used for any non-white- space character? - answer ✅✅\S What does & signify in the string "R2D2&C3PO"? - answer ✅✅A boundary between words The regular expression pattern for a character class is _____. - answer ✅✅[chars] To create a negative character class that matches any character not in the class, preface the list of characters with the _____ symbol. - answer ✅✅^ Which of the following should be appended to a character to repeat it n times? a. [n] b. "n" c. {n} d. (n) - answer ✅✅{n} In a regular expression, you can define two possible patterns for the same text string by joining different patterns using the _____ character. - answer ✅✅|
Which of the following methods should Lisa use to format the numbers as currency? - answer ✅✅toLocaleString() If Lisa uses minimumIntegerDigits: num method, which of the following is the correct range for num? - answer ✅✅1 to 21 Thomas is working on reference forms and form fields. He wants to use event handlers that can respond to user actions within a form. He uses the element.onchange event handler. Identify the description of the event handler Thomas has used. - answer ✅✅The value of element has been modified Which event handler should Thomas use for options buttons and check boxes in response to the user clicking those elements? - answer ✅✅element.onclick Samantha is working on a web document. She wants to direct the browser to retrieve specific information about a URL, to reload the current page, and to load an entirely new page. Identify the object that Samantha should use to meet her desired requirements. - answer ✅✅location Which of the following commands can Samantha use to load a new page in the current window? - answer ✅✅window.location = url
William is exploring the syntax of regular expressions. He learns that in the regular expression language, a word refers to any string of symbols consisting solely of word characters. He also learns that word boundaries are indicated by the \b symbol. He wants to use a pattern that matches any word that starts with the characters "great" such as "greater", "greatness", or "greatest" Which of the following patterns should William use? - answer ✅✅/
bgreat/ Which of the following patterns should William use to match any word that ends with "ust" such as "dust", "trust", or "must"? - answer ✅✅/ust\b/ A _____ is created using the select and option elements that present users with a group of predefined possible values for the data field. - answer ✅✅selection list Every field set must contain the _____ element, which should have only text and no nested elements for describing its content. - answer ✅✅legend get and post are two possible values for the _____ attribute. - answer ✅✅method Identify a syntax that displays a selection list as a scroll box with 5 options visible in the web form. - answer ✅✅ ...
A command that indicates an action for the browser to take should end with a _____. - answer ✅✅semicolon A _____ occurs after a script has been successfully loaded with no syntax errors and is being executed by a browser. - answer ✅✅run- time error A _____ is a collection of commands that performs an action or returns a value. - answer ✅✅function A _____ is a named item in a program that stores a data value, such as a number or text string, or an object, such as a part of the web browser or browser window. - answer ✅✅variable The _____ attribute can be applied to the script element to ensure that an object can be referenced within a JavaScript program that runs only after the page has completed loading. - answer ✅✅defer _____ programming distributes the load to prevent a server from getting overloaded with program-related requests. - answer ✅✅ Client-side A user can create an embedded script by removing the _____ attribute and placing all of the JavaScript code within the script element. - answer ✅✅src Identify the general structure for accessing each value from an array using for loop. - answer ✅✅for (var i = 0; i < array.length; i+ +) { commands involving array [i] }
What is the output of the following code? for (var i = 0; i <= 360; i+=60) - answer ✅✅i = 0, 60, 120, 180, 240, 360 identify the expression used to reference array values. - answer ✅✅array [i] Identify the general structure of a for loop. - answer ✅✅for (start; continue; update) { commands } Identify the structure of an if statement. - answer ✅✅if (condition) { commands } Which of the following determines the current size of an array? - answer ✅✅array.length Which of the following examples tests whether x is equal to 5 or y is equal to 8? - answer ✅✅(x === 5) II (y === 8) Identify a method that is used to create a subarray - answer ✅✅slice()
The ______ event handler is applied to a page when it is about to be unloaded by the browser. - answer ✅✅onbeforeunload Which of the following is the correct location of a key on a keyboard if the value of the keyboard property evt.location is 3? - answer ✅✅The key is located on the numeric pad. Which of the following is the syntax to define a cursor in JavaScript? - answer ✅✅object.style.cursor = cursorTypes; Which of the following JavaScript expressions is equivalent to the given HTML code?
Identify the reason for which attribute is added to a form element. - answer ✅✅To append from data to the URL In many web forms, important data is stored within ______ so that the data is available to programmers but removed from the user's control. - answer ✅✅hidden fields Radio buttons are grouped by a common field name placed within the ____ array - answer ✅✅options [idref] Since a page can contain multiple web forms, JavaScript organizes the forms into _____ object collection. - answer ✅✅document.forms [idref] Using the ______, you can direct the browser to retrieve specific information about the URL, to reload the current page, or to load an entirely new page. - answer ✅✅location object Which of the following selection list properties returns True if more than one option can be selected from the list? - answer ✅✅select.multiple _______ is a selection list property that returns the number of options displayed in the selection list. - answer ✅✅select.length, select.size