1. Trang chủ
  2. » Kinh Doanh - Tiếp Thị

Test bank for introduction to javascript programming with XML and PHP by drake download

6 63 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 6
Dung lượng 321,51 KB

Nội dung

Introduction to JavaScript Programming with XML and PHP Test Bank Chapter Test Bank for Introduction to JavaScript Programming with XML and PHP by Drake Test Bank for Chapter MULTIPLE CHOICE Which is the first step in the program development cycle? a design a program b analyze the problem c code the program and review the results d test the program ANS: B Which of the following is not a control structure? a sequence b selection c syntax d repetition ANS: C Which of the following is NOT one of the primary JavaScript data types? a float b numeric c Boolean d string ANS: A a b c Which type of data type can have only one of two possible values? float numeric Boolean © 2014 Pearson Education Introduction to JavaScript Programming with XML and PHP Test Bank Chapter d string ANS: C Which of the following is not an acceptable variable name? a one_name b name_One c 1_Name d theFirstName ANS: C a b c d Which of the following is not an acceptable variable name? my Friend your_Friend We_Are_All_Friends all of the above are acceptable variable names ANS: A If the variable hours = 10, what is the value of the variable salary after the following instruction has been executed: salary = hours * a 10 b c 80 d cannot tell from the information given ANS: C Which tags are used to provide alternate content for users who have disabled scripts in their browsers? a b c < /no script> d there are no such tags ANS: A Which would be used to have a JavaScript function named hello() execute before the user views a web page? a JavaScript content b c d © 2014 Pearson Education Introduction to JavaScript Programming with XML and PHP Test Bank Chapter ANS: C 10 Which of the following describes a JavaScript object? a anything you can click on b anything that describes something you can click on c anything something you can click on can d any HTML tag pair ANS: A 11.Which of the following describes a JavaScript method? a anything you can click on b anything that describes something you can click on c anything something you can click on can d any HTML tag pair ANS: C 12.Which of the following describes a JavaScript property? a anything you can click on b anything that describes something you can click on c anything something you can click on can d any HTML tag pair ANS: B 13 Which method allows you to display text on an HTML page? a onload b show() c display() d write() ANS: D 14 Which method will retrieve the contents of an HTML element? a document.get() b getElementById() c innerHTML d document.innerHTML ANS: B © 2014 Pearson Education Introduction to JavaScript Programming with XML and PHP Test Bank Chapter 15 Which would you use to replace the contents of an HTML page with the value stored in a variable named student? a document.write(student); b document.getElementById(student); c document.write(student.innerHTML); d document.write(student.HTML); ANS: C 16 Which of the following will open a new window named mywindow that is 500 pixels in height and 350 pixels wide? a mywindow = new window(height = 600, width = 350); b mywindow = window.open(height = 600, width = 350); c mywindow = window.open(""; ""; height = "600"; width = "350"); d mywindow = window.open("", "", "height = 600, width = 350"); ANS: D 17 Which of the following will close a window named mywindow ? a close mywindow; b mywindow = close(); c mywindow.close(); d mywindow.close; ANS: C 18 Which of the following will prompt the user to enter his or her name? a var name = window.open("What is your name?"); b prompt("What is your name?", name); c var name = document.write("What is your name?"); d var name = prompt("What is your name?"); ANS: D 19 Which is the correct way to define a function named getAge()? a function getAge() { body of function } b getAge = new function c getAge() { body of function } d new function getAge() { body of function } ANS: A © 2014 Pearson Education Introduction to JavaScript Programming with XML and PHP Test Bank Chapter 20 Which of the following would retrieve the value displayed in a element which has id = "football" and store that information in a variable named sport? a sport = document.getElementById("football"); b document.getElementById("football") = sport; c sport = document.innerHTML(id = "football"); d document.write("football"); ANS: A TRUE/FALSE True/False: The last step in the program development cycle is to code the program ANS: F True/False: A prompt is used in a program to tell the user to enter some data ANS: T True/False: The onload event is used to have JavaScript execute before the user begins to view the page ANS: T True/False: The tags are used only when you wish to include JavaScript within the body of a web page ANS: F True/False: The write() method can only be used to display text within

tags ANS: F True/False: In most cases the words function and method mean the same thing ANS: T True/False: To define a function, you must use the function keyword ANS: T True/False: The innerHTML property allows you to retrieve information from an element on a web page ANS: F True/False: Parameters are values that the user inputs to a program ANS: F 10 True/False: The prompt() method allows you to prompt the user to input values ANS: T © 2014 Pearson Education Introduction to JavaScript Programming with XML and PHP © 2014 Pearson Education Test Bank Chapter

Ngày đăng: 01/03/2019, 14:48

TỪ KHÓA LIÊN QUAN

w