Web Dev Final
In an ASP.Net application written in C#, the __________ file contains the user interface, while the ______________ file only contains code. A. .cs, .aspx B. .aspx, .cs C. .asax, .cs D. .aspx, .cs or .vb
D. .aspx, .cs or .vb
What would the browser output if the following script is executed? ..code.. A. Nothing, the script would generate error B. 123 C. 123 456 D. 123 123
D. 123 123
What would the function cube return, assuming it is called with the statement cube(3)? function cube(y) { return Y*Y*Y; } A. javascript runtime error B. 3 C. 9 D. 27
D. 27
Which of the following is not a type of Web control? A. HTML server controls B. Web server controls C. Validation controls D. None of the above
D. None of the above
Is this correct HTML?
No
What will be the return value of the following code? ('0' ? '0' : '1') A. '0' B. 0 C. 1 D. Error in the code
A. '0'
Which of the following selections is the proper way to apply this CSS rule: .margin (margin-left: 0.75in;) A. <p class = "margin"> B. <p style = "margin"> C. <p> D. <p class = ".margin"?
A. <p class = "margin">
What will be the output? var x = 0.000002; var y = 0.000003; var result = (Math.abs(x-y) < 0.000001); alert(result); A. False B. undefined C. True D. Error in the code
A. False
What would the browser display if the following code were executed in a script? var x = 11; var y = 14; if ( x > 13 ) if ( y > 13 ) document.writeln( "x and y are > 13" ); else document.writeln( "x is <= 13" );
A. Nothing
What will be return value? (0.457).toFixed(2) === 0.45 A. false B. undefined C. Error in code D. True
A. false
Event _________ fires constantly whenever the mouse is in motion. A. onmousemove B. onmouseover C. onmouseout D. all of these
A. onmousemove
Function definitions often contain ________, which are considered to be local variables and correspond with the arguments in the function call. A. parameters B. static variables C. register variables D. constant variables
A. parameters
Using the document object model, the simplest way to reference an element is by using ___________ A. the elements id attribute B. the innerText property of a p element C. the all collection D. the innerHTML property of a p element
A. the elements id attribute
What is the correct JavaScript syntax to insert a comment that has more than one line? A./*This comment has more than one line */ B. //This comment has more than one line // C. <!--This comment has more than one line -->
A./*This comment has more than one line */
Which of the following is the correct format for a C# Page directive that identifies the matching code behind file? A.<%@ Page Language= "C#" Inherits="MyPageClass" Src="MyPage.cs" %> B. <%@ Page Language= "C#" Inherits="MyPageClass" Codebehind="MyPage.cs" %> C. <!@ Page Language= "C#" Inherits="MyPageClass" Codebehind="MyPage.cs" %> D. <!@ Page Language= "C#" Inherits="MyPageClass" Src="MyPage.cs" !>
A.<%@ Page Language= "C#" Inherits="MyPageClass" Src="MyPage.cs" %>
<asp:TextBox id="txt" runat="server /> is an example of: A.an HTML server control B. a Web server control C. a Validation control D. a User control
A.an HTML server control
Given the following which statement would be the correct replacement of a paragraph with id "message" for the comment line (assuming the W3C DOM): A.document.getElementById("message").style.visibility = "hidden"; B.document.message.visibility = hidden; C. document.getElementsByTagName.visibility = "hide"; D. document.setAttribute.style.visibility= "hidden";
A.document.getElementById("message").style.visibility = "hidden";
Which of the following is not a DOM collection? A.roots B. anchors C. links D. forms
A.roots
Which of the following statements is not true? A. JavaScript is case sensitive B. Each JavaScript statement ends with a semicolon(;). C. A single slash (/)indicates a single-line comment in JavaScript D. Curly braces ({}) are used to combine multiple JavaScript statements into a statements block
c. A single slash(/) indicates a single-line comment in JavaScript
Setting the width property to 10em will create an element that has a width that is ___________. A.size 10pt B. 10 times larger than the font size C.10 times smaller of the font size D. italicized and 10pt in size
B. 10 times larger than the font size
What is the result of the statement 17 % 5? A. 0 B. 2 C. 3 D. 12
B. 2
An _______ is a script that is implicitly executed in response to an occurance such as completion of loading the document or a user action A. Event B. Event handler C. Event-driven program D. none of the above
B. Event handler
Which one of the following statements is true? A. the onload event fires whenever an element starts loading B. The onclick event fires when the user clicks the mouse on an element C. The onfocus event fires when an element loses focus D. Returning true in an event handler on an a(anchor) element prevents the browser from following the link when the event handler finishes.
B. The onclick event fires when the user clicks the mouse on an element
How do you create a function in Javascript? A. function:myFunction() B. function myFunction() C. function = myFunction()
B. function myFunction()
All variables declared in function definitions are _______ A. global variables B. local variables C. static variables D. constant variables
B. local variables
Which of the following is NOT a valid function call? A. var x = myfunc(); B. myfunc; C. x = myfunc(); D. myfunc();
B. myfunc;
Which of the following is not an event that can trigger a JavaScript? A. Mouse actions B. operating system actions C. keyboard actions D. timed actions
B. operating system actions
Which one of the following is a valid variable declaration statement in JavaScript? A. var i B. var submit; C. var myMessage = "\"Go! Mavericks.\""; D. var 1student, 2student;
B. var submit;
What would the browser display if it executed the following script?
B.51
What is the correct syntax for referring to an external script called "xxx.js"
B.<script type = "text/javascript" src="xxx.js">
Interactive Web Pages are created with_____ scripting A.client-side B.server-side. C.none of the above D.both A and B
B.server-side.
Which of the following is NOT done with JavaScript A. Form validation B. Browser detection C. Dynamically change the style of a webpage D. RGB colors
C. Dynamically change the style of a webpage
What does the following script do? ..code.. A. it counts the number of seconds elapsed while loading the page B. It counts the number of milliseconds elapsed while loading the page C. It counts the number of seconds elapsed viewing the page D. It counts the number of milliseconds elapsed while viewing the page
C. It counts the number of seconds elapsed viewing the page
In creating an image rollover, which should be the first step: A. create functions to swap the image objects B. Create onmouseover and onmouseout event handlers to call the functions to swap the images C. Preload the images being used D. Populate the image arrays
C. Preload the images being used
_______ extend the concept of software reuse to the Internet by allowing developers to reuse software components that reside on another machine or platform A. Web servers B. Web pages C. Web services D. Common gateway interfaces
C. Web services
The onfocus event fires when ________ A. an element is loaded from the document B. an image is loaded into the document C. an element is clicked D. an image is downloaded
C. an element is clicked
Which of the following is the proper method to access the length of the array arr? A. arr[].length B. arr[subscript].length C. arr.length D. arr(length)
C. arr.length
The second control statement in a for loop usually A. sets the termination condition B. increments a counter C. creates a control variable D. none of the above
C. creates a control variable
An object's methods and attributes are accessed by writing the name of the object following ___________ A. method name/ attribute name B. method/ attribute index C. dot D. property operator
C. dot
How do you call a function named "myFunction" in Javascript? A. call function myFunction B. call myFunction() C. myFunction()
C. myFunction()
If an element's position is declared as absolute then_________ A.positioning of the element is handled by the browser B. positioning is handled by the normal flow of elements on the page C. positioning is set according to the margins of its parent element D. positioning is handled by relative positioning
C. positioning is set according to the margins of its parent element
When defining a map on an image, which of the following is not a shape of area you can define as? A. circle B. rectangle C. triangle D.poly
C. triangle
What is the correct JavaScript syntax for opening a new window called "w2" A. w2 = window.new("http://www.w3schools.com"); B. w2 = new("http://www.w3schools.com"); C. w2 = window.open("http://www.w3schools.com"); D. w2 = open("http://www.w3schools.com");
C. w2 = window.open("http://www.w3schools.com");
.aspx files are usually referred to as ___________ as they usually process form input. A. ASP.NET forms B. Forms C. Windows forms D. Web forms
D. Web forms
The same object can have how many properties and methods? A. one or the other B. one of each C. as many as you want of one of other D. as many of both as you want
D. as many of both as you want
Which of these is the method of the window object that stops repetitive calls to a method? A. clearTimer B. stopTimer C. stopInterval D. clearInterval
D. clearInterval
The code to obtain a random integer number between 5 and 9 inclusive is : A. Math.floor(Math.random() * 5) + 4); B.Math.floor(Math.random() * 4) + 4); C.Math.floor(Math.random() * 4) + 5); D.Math.floor(Math.random() * 5) + 5);
D.Math.floor(Math.random() * 5) + 5);
Which of the following statements is correctly written?
a. If(studentGrade >= 60) Document.write("passed");