Question 1 of 20 5.0 Points You want to display a message on your Web page to users that don't have JavaScript enabled in their browser. Which of the following code snippets below performs this? A. <!--You don't have JavaScript enabled // B. <!-- Y

profileUOPOnlineTutor
 (Not rated)
 (Not rated)
Chat

 

Question 1 of 20

5.0 Points

You want to display a message on your Web page to users that don't have JavaScript enabled in their browser. Which of the following code snippets below performs this?

  A. <!--You don't have JavaScript enabled //      

  B. <!--

You don't have JavaScript enabled

//           

  C. if (NOSCRIPT) You don't have JavaScript enabled      

  D. <NOSCRIPT>You don't have JavaScript

enabled</NOSCRIPT>  

 

Question 2 of 20

5.0 Points

What are the <NOSCRIPT> tags used for?

  A. To turn off JavaScript on the users computer.            

  B. To disable JavaScript on the Web site.            

  C. To enclose a message inside the tags for users who don't have JavaScript enabled on their browser.               

  D. To indicate a Java Applet.     

 

Question 3 of 20

5.0 Points

A children's site wants to ask its users what 4 + 4 equals. Which method is best for obtaining the correct answer from the users?

  A. alert()           

  B. prompt()     

  C. confirm()     

  D. request()    

 

Question 4 of 20

5.0 Points

Which of the following code snippets displays the proper use of the for loop?

  A. for (i=10, i>5, i--) {

}             

  B. for (i=10; i>5; i--)

}             

  C. for ("i=10, i>5, i--") {

}             

  D. for i=10, i>5, i--{

}             

 

Question 5 of 20

5.0 Points

What does the following code do?

 

setTimeout("myFunction()", 100)

  A. Executes myFunction 100 times        

  B. Executes myFunction after a counter reaches 100    

  C. Executes myFunction after pausing for 100 milliseconds        

  D. Executes myFunction for 100 milliseconds    

 

Question 6 of 20

5.0 Points

JavaScript refers to images by their __________ attribute.

  A. GIF

  B. JPEG              

  C. NAME           

  D. IMG               

 

Question 7 of 20

5.0 Points

When creating a rollover, the mouse event handlers must be placed in the __________ tag.

  A. <A></A>     

  B. <IMG>          

  C. <SCRIPT></SCRIPT>               

  D. <MOUSE></MOUSE>            

 

Question 8 of 20

5.0 Points

The statement if (document.images) checks to see if the:

  A. computer recognizes images.            

  B. browser recognizes JavaScript.          

  C. browser can preload the images.      

  D. browser recognizes image objects.

 

Question 9 of 20

5.0 Points

When creating image rollovers, the images involved must have the same __________.

  A. image type

  B. size dimensions        

  C. color              

  D. subject matter          

 

Question 10 of 20

5.0 Points

A semicolon in a JavaScript marks the end of a __________.

  A. line                

  B. function       

  C. method        

  D. statement  

 

Question 11 of 20

5.0 Points

A/An __________ references individual items in an array.

  A. arrayIndex  

  B. arrayindex  

  C. subscript      

  D. superscript

 

Question 12 of 20

5.0 Points

The __________ statement appears after the JavaScript statement in each case.

  A. break            

  B. option           

  C. array              

  D. select            

 

Question 13 of 20

5.0 Points

To create an image object that can be referenced by JavaScript code, you must add the _________ attribute to the HTML IMG SRC tag.

  A. object           

  B. form              

  C. name            

  D. event handler           

 

Question 14 of 20

5.0 Points

What is wrong with the following syntax?

 

function notify()

     alert("You triggered a function")

  A. There is no space between notify and ().      

  B. The braces { } are missing.    

  C. function should be capitalized.          

  D. You can't have a method in a function.          

 

Question 15 of 20

5.0 Points

An alternative to the If ... Else statement to test for multiple conditions is the __________ statement.

  A. switch           

  B. array              

  C. while             

  D. index            

 

Question 16 of 20

5.0 Points

An __________ is a collection of data items, represented by one variable name.

  A. index            

  B. array              

  C. alert               

  D. event handler           

 

Question 17 of 20

5.0 Points

The __________ method returns the number of milliseconds that have elapsed since 12:00 a.m., January 1, 1970.

  A. getTime()    

  B. getDate()    

  C. timeNow()  

  D. secondsTime()          

 

Question 18 of 20

5.0 Points

One of the three steps necessary to create a rolling banner is to create an __________ object.

  A. image           

  B. index             

  C. index of       

  D. initialization                

 

Question 19 of 20

5.0 Points

The __________ HTML tag is a form element used to define a selection list.

  A. <LIST>          

  B. <SELECT>     

  C. <INDEX>      

  D. <BUTTON>

 

Question 20 of 20

5.0 Points

Using the recursive method of setTimeout("myFunction()",5000) creates a delay of:

  A. 5 seconds.  

  B. 5,000 seconds.          

  C. 50 seconds.                

  D. 5 minutes.  

 

 

               

 

 

  • 10 years ago