PRX301 (Section JavaScript)
A variable that your webpage can store on or retrieve from the users computer is known as ? a. Applet b. Java c. Cookie d Session
c
What is the correct syntax for referring to an external script called "xxx.js"? a. <script name "xxx.js"> b. <scripthref "xxx.js"> c. <script src="xxx.js"> d. <link src "xxx.js">
c
Which has no syntax error? a. alcrt("hello "+3+" times); b. alert("hello "+3 times); c. alert("hello +3+ times"); d. alert("hello "+3 +" times);
c
How do you read the first character in a string? a. stringName.charAt(0); b. stringName.substring( 1 ); c. stringNa1ne.charAt(1); d. stringName.charAt(2);
a
It is usually advisable to keep as much JavaScript as possible in which section? a. Head b. Layer c. Body d. Title
a
The most common way to assign a value to a variable is by using what ? a. Equals sign b, Name It c. CSS d. HTML
a
To keep the browser from performing a script as soon as it is loaded you need to write the script as a what ? a function b delay c performance d Flexibility
a
Which is detected When the mouse moves over a link? a. overMouse event b. onMouseOver event c. onRollOver event d. OnMouseOut event
a
JavaScript lines end with what? a. comma b. semicolon c. colon d. Bracket
b
What is the correct JavaScript syntax to write "Hello World"? a. Hello World" b. document.write("Hello World") c. response.write("Hello World") d. ("Hello World")
b
Where is the correct place to insert a JavaScript? a. The <head> section b. Both the <head> section and the section are correct c. The <body> section d. The <Title> Section
b
Which of the following is NOT done with JavaScript? a. Form Validation b. RGB Colors c. Browser Detection d. RGB Value
b
Actions that can be detected by JavaScript are called? a. HTML b. Events c. Array d. ArrayList
b
In JavaScript, capital letters are different from lowercase letters? a. Not on windows platforms b. Yes c. No d. Not on Linux Platform
b
Which method is used to search for a substring? a. stringVariable.substring(subString) b. stringVariable.find(subString) c. stringVariable.index0f(subString) d. stringVariable.indexOf(charAt(O))
c
Which of the following is NOT a type of popup box? a. Alert b. Confirm c. Radio d. Text
c
a++; is the same as which of the following ? a. a a+2; b. a a+3; c. a=a+1; d. a a+4;
c
Inside which HTML element do we put the JavaScript? a. <scripting> b. <javascript> c. <js> d. <script>
d
Which best describe void? a. method b. function c. statement d. operator
d
Which method will open a new window? a. popUp(PageURL,WindowName,settings); b. window.launch(PageURL,WindowName,settings); c. window.close(PageURL,WindowName,settings); d. window•open(PageURL,WindowName,settings);
d