Web Designing Final

¡Supera tus tareas y exámenes ahora con Quizwiz!

In JavaScript, how do you separate words in a sentences into individual words and store them in an array. A) var words = sentence.split(" "); B) array words = sentence.split(" "); C) var[] words = sentence.split(" "); D) array[] words = sentence.split(" ");

A

In JavaScript, which of the following is the correct way to create a function called displayEquation? A) function displayEquation() B) displayEquation() function C) function = displayEquation() D) displayEquation() = function

A

In JavaScript, you can use the Math object's random method to generate a random number between 0 and 1. Which of the following is the correct way to store the random number in a variable called randNum? A) var randNum = Math.random(); B) Var ranNum = randum(); C) var randNum = random.Math(); D) var randNum = random(Math);

A

In jQuery, write a statement that removes all <p> elements. A) $("p").remove(); B) $("p").removeAll(); C) $("document").remove("p"); D) $("document").removeAll("p");

A

Programming languages use __________ to store values in computer memory so that the values can be readily available to the programming instructions. A) variables B) special codes C) HTML D) JavaScript

A

What is the $ sign in jQuery? A) a shortcut for a function called jQuery. B) a symbol for the beginning of jQuery statements. C) a symbol that indicates that it is not a JavaScript statement. D) it does not mean anything.

A

Which of the following is a container in Bootstrap? A) container-fluid B) container-fixed C) container-full D) container-narrow

A

Bootstrap uses classes. Which class provides a responses fixed width for the (div) element? A) responsive B) container C) container-fixed D) container-fluid

B

In Bootstrap, if you see the following line, how many columns does the page designer plan to have assuming all columns are equal width? <div class="col-sm-4">My first column</div> A) 2 B) 3 C) 4 D) 6

B

In JavaScript, which event occurs when the user clicks on an HTML element? A) onmouseclick B) onclick C) onhover D) onhtml

B

In jQuery, what are the codes for setting all <h1> element backgrounds red? A) $("h1").background-color("red"); B) $("h1").css("background-color", "red"); C) $("h1").style("background-color", "red"); D) $("h1").setcss("background-color", "red");

B

In jQuery, what does ("div#aboutMe") select? A) any element with the id = "aboutMe" B) only the <div> element with the id = "aboutMe" C) any element with the class = "aboutMe" D) only the <div> element with the class = "aboutMe"

B

Which of the following is a JavaScript variable naming rule? A) variable names are not case sensitive B) variable names should start with a letter or an underscore C) variable names should include both letters and numbers D) variable names can include space

B

Which of the following is a correct way for single line comments in JavaScript? A) <comment> this is JavaScript comment </comment> B) //this is JavaScript comment C) /this is JavaScript comment D) <!--this is JavaScript comment //-->

B

Which of the following JavaScript codes will pop up a message box with words "It works!"? A) messagebox("It works"); B) msgbox("It works!"); C) alert("It works!"); D) alertbox("It works");

C

Which of the following statements about jQuery is true? A) jQuery library is included in all major browsers, such as Firefox, Edge, Chrome, and Safari. B) To use jQuery, you must download and install jQuery on the server. C) To use jQuery, you can add a link to your HTML documents that points to a CDN. D) When a new version of jQuery comes out, your link to CDN will be automatically be updated if you don't provide a version number in the link.

C

jQuery works on the elements on the page. if an element is not loaded yet and when jQuery works on it, an error will occur. How does jQuery make sure this won't happen? A) jQuery can auto detect it B) the browser can auto detect it C) You should use $("document").ready() D) You should minimize the number of HTML elements to avoid such errors.

C

What is bootstrap? A) A front-end website framework B) Based on HTML, CSS, and JavaScript. C) Free and easy to use D) all of the above

D

What will the following HTML codes do? <input type = "text" pattern = "[A-F]"> A) The text field will accept only character A. B) The text field will accept only character F C) The text field will accept only character A, -, F. D) The text field will accept only character between A to F.

D

Which is the JavaScript syntax to change the content of the HTML element <p> with an id of "myParagraph"? A) document.getElementById("my Paragraph") = "New paragraph."; B) document.getElementById ("p") = "New paragraph."; C) document.getElementById("my Paragraph").p = "New paragraph."; D) document.getElementById("my Paragraph").innerHTML = "New paragraph.";

D

Which of the following is a correct way to include JavaScript code in the HTML document? A) <javascript> //Insert your JavaScript code here; </javascript> B) <type = "text/JavaScript"> //Insert your JavaScript codes here; </type> C) <text/JavaScript> //Insert your JavaScript here; </text/JavaScript> D)(script) //Insert your JavaScript here; (/script)

D

In Bootstrap grid system, what's the difference between a class value of col-sm-4 and col-lg-4? A) col-sm-4 are narrower than col-lg-4 columns B) col-sm-4 are smaller than col-lg-4 columns C) no difference in use on any size screen D) col-sm-4 will collapse the columns at narrower screen width than col-lg-4

D

In JavaScript, how do you remove the decimal part of a number? A) Math.removedecimal(2.34); B) Math.nodecimal(2.34); C) Math.getint(2.34); D) Math.floor(2.34);

D

In JavaScript, suppose userAnswer is a variable. Which of the following is the correct way to compare if the userAnswer is 11? A) if userAnswer is 11 B) if userAnswer = 11 C) if userAnswer == 11 D) If (userAnswer == 11)

D

In JavaScript, which of the following is the correct way to call a function called displayEquation? A) function displayEquation() B) call displayEquation() C) function = displayEquation() D) displayEquation()

D

In jQuery, how do you make the <h1> element invisible? A) $("h1").invisable(2000); B) $("h1").visible(false); C) $("h1").invisible(true); D) $("h1").hide(2000);

D

In jQuery, if you want to make all elements on the same level as <h1> to have certain properties, which selector should you use? A) $("h1").samelevel() B) $("h1").peer() C) $("h1").same() D) $("h1").siblings()

D

In jQuery, suppose there's a button with id = "moreParagraphs". Write a statement to insert a paragraph before the button. A) $("#moreParagraphs").add("<p>New paragraph</p>"); B) "<p>New paragraph.</p>".add("#moreParagraph"); C) $("#moreParagraphs").insert("<p>New paragraph</p>"); D) $("#moreParagraphs").before("<p>New paragraph</p>");

D

If you want the browser to communicate with the Web server by using JavaScript, you can use a technique called AJAX. True False

T

In order to apply Bootstrap to an HTML document, you must add necessary (link) and (script) elements to your HTML file and make sure your computer is connected to the internet. True False

T

In order to apply Bootstrap to an HTML element, the element must use a class attribute with the value pre-defined by the bootstrap. True False

T

JavaScript has a method called "addEventListener()" which can call a function when an event is fired. True False

T

Variable names in JavaScript is case sensitive. True False

T

jQuery is a JavaScript library that makes writing JavaScript codes easier. True False

T

How do you declare a variable in JavaScript? A) variable myVariableName; B) myVariableName variable; C) var myVariableName; D) var = myVariableName;

C

How do you set the h1 element with id of "h" background color to red in JavaScript? A) document.h1.red; B) document.h1.style.red; C) document.getElementById("h").backgroundColor = "red"; D) document.getElementById("h").style.backgroundColor = "red";

C

How many times will the following JavaScript codes display "Hello World"? for (var i = 0; i <5; i++){alert("Hello World");} A) 0 B) 1 C) 4 D) 5

C

In JavaScript, How do you declare an array called digits? A) var digits = array; B) array digits; C) var digits = []; D) array digits = [];

C

In an HTML file, how do you refer to an external JavaScript file called language.js A) (script href = "language.js")(/script) B) (script name = "language.js")(/script) C) (script src = "language.js")(/script) D) (script)language.js(/script)

C

In jQuery, what are the codes for setting all <h1> element backgrounds red and text centered? A) $("h1").css("red", "center"); B) $("h1").css("background-color", "red"; "text-align", "center"); C) $("h1").css({"background-color": "red", "text-align": "center"}) D) You cannot define two CSS styles on one element in one statement.

C

In jQuery, what does $("div").css("border", "solid 1px red"); do? A) The first <div> element will have a red border. B) The last <div> element will have a red border. C) All the <div> elements will have a red border. D) The element with the id = "div" will have a red border.

C

In jQuery, what does $("div, .aboutMe") select? A) any element with the class = "aboutMe" B) all <div> elements C) both A and B D) none of the above.

C

In jQuery, what does $("div.aboutMe") select? A) any element with the id = "aboutMe" B) only the <div> element with the id = "aboutMe" C) any element with the class = "aboutMe" D) only the <div> element with the class = "aboutMe"

C

All JavaScript codes have to be inside the <head> element. True False

F

If you open an external JavaScript file in a text editor, most likely the first line of the codes is (script) tag. True False

F

In order to apply Bootstrap to an HTML element, you must first download all necessary files to your local computer and provide a CSS link to that folder and files. True False

F

In order to apply Bootstrap to an HTML element, you must learn how to use CSS3. True False

F

Java is a short name for JavaScript. True False

F

jQuery is a JavaScript library runs on both browsers and Web servers. True False

F

jQuery uses the same selectors as CSS. True False

F


Conjuntos de estudio relacionados

Chapter 11: Drug Therapy for Hematopoietic Disorders

View Set

MFT study ch.1: Research Methods

View Set

Ch 1: Information Systems an overview

View Set

PYS 101 Chap 5 - Sensation & Perception

View Set

NURS 1240 Culture & Diversity EAQ

View Set