Sei sulla pagina 1di 26

1D0-635

Number: 000-000
Passing Score: 800
Time Limit: 120 min
File Version: 1.0

http://www.gratisexam.com/

CIW 1D0-635

CIW JavaScript Specialist

Practice Test
Version: 4.0
CIW 1D0-635: Practice Exam
Exam A

QUESTION 1
Assuming the function <body onload="DisplayName()"> is called, which script block will display Hello Joe in the
document window after you enter the name Joe?

A. <script type="text/javascript">
function DisplayName(void){
var YourName = window.prompt("What is your name?","Please enter your name"); document.write("Hello "
+ YourName);
}
</script>
B. <script type="text/javascript">
function DisplayName(){
var YourName = window.prompt("What is your name?","Please enter your name"); document.write("Hello "
+ YourName);
}
</script>
C. <script type="text/javascript">
function DisplayName(void){
var YourName = document.prompt("What is your name?",Please enter your name); document.write("Hello "
+ YourName);
}
</script>
D. <script type="text/javascript">
function DisplayName(){
var YourName = document.prompt("What is your name?","Please enter your name"); document.write("Hello
" + yourname);
}
</script>

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 2
Consider the following code fragment, which sets up the retrieval of an XML document named fish.xml and
calls a function named showFish(): var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "fish.xml", true);
xmlhttp.onreadystatechange = showFish(); xmlhttp.send(); Which line of code initializes the XMLHttpRequest
object?

A. xmlhttp.send();
B. var xmlhttp = new XMLHttpRequest();
C. xmlhttp.open("GET", "fish.xml", true);
"Pass Any Exam. Any Time." - www.actualtests.com 2
CIW 1D0-635: Practice Exam
D. xmlhttp.onreadystatechange = showFish();

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:
QUESTION 3
Which of the following demonstrate the correct syntax for the switch statement?

A. var myName= "Paul"


switch (myName){
case "Peter"
document.write("My name is Peter.<br />")
break
case "Paul"
document.write("My name is Paul.<br />")
break: (default);
document.write("I do not have a name.<br />")
}
B. var myName= "Paul"
switch (myName){
case "Peter"
document.write("My name is Peter.<br />")
break
case "Paul"
document.write("My name is Paul.<br />")
break: (default);
document.write("I do not have a name.<br />")
}
C. var myName= "Paul"
switch (myName){
case (Peter)
document.write("My name is Peter.<br />")
break
case (Paul)
document.write("My name is Paul.<br />")
break;
case: (default);
document.write("I do not have a name.<br />")
}
D. var myName= "Paul"
switch (myName){
case (Peter)
document.write("My name is Peter.<br />")
break
"Pass Any Exam. Any Time." - www.actualtests.com 3
CIW 1D0-635: Practice Exam
case (Paul)
document.write("My name is Paul.<br />")
break;
case: (default);
document.write("I do not have a name.<br />")
}

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 4
Consider the following code: <script type="text/javascript"> var v1 = "alpha"; function f () { var v2 = "bravo"; alert
(v1 + ", " + v2); } f(); v1="charlie"; alert (v1 + ", " + v2); </script> What is the expected result when you run this
script in the browser?

A. An alert box displaying charlie, bravo


B. An alert box displaying alpha, bravo followed by an error
C. Two alert boxes displaying alpha, bravo and alpha, bravo respectively
D. Two alert boxes displaying alpha, bravo and charlie, bravo respectively, followed by an error

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 5
Which of the following is a valid variable name in JavaScript?

A. this
B. that
C. 2that
D. 2this

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 6
What basic code is needed to define a function in JavaScript?

"Pass Any Exam. Any Time." - www.actualtests.com 4


CIW 1D0-635: Practice Exam

A. function myFunction { }
B. define myFunction() { }
C. function myFunction() { }
D. define myFunction { return value; }

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 7
When using AJAX, what is the purpose of the XMLHttpRequest object?
http://www.gratisexam.com/

A. To transfer an XML document to the Web server


B. To request data from the Web server strictly in XML format
C. To read and write to an XML file stored on the local machine
D. To request either XML data or plaintext data from the Web server

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 8
Which statement will correctly call a JavaScript function without error?

A. var myFunction()
B. initiate myFunction()
C. call myFunction()
D. myFunction()

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 9
Consider only the following code:

"Pass Any Exam. Any Time." - www.actualtests.com 5


CIW 1D0-635: Practice Exam

Which of the following would properly supply the sum of the two numbers?

A. return sum;
B. mySum (num1+num2);
C. return num1+num2;
D. return sum(num1+num2);
Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 10
Which is the best technique to test a script for cross-browser compatibility?

A. Use the W3C site's code validator to test the script.


B. Test the script in various versions of the same browser.
C. Test the script in various browsers, including various versions of the same browsers.
D. Determine the most frequently used browser for your target audience and then test the script in that
browser.

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 11
Consider the following code:

"Pass Any Exam. Any Time." - www.actualtests.com 6


CIW 1D0-635: Practice Exam
What is the expected result when you run this script in the browser?

A. There will be no visible output, but the script will count down to 0.
B. The script will output a countdown from 15 to 0 in the client window.
C. The script will output a countdown from 15 to 1 in the client window.
D. The script will output 15, then 1, because it will only write the first and last values of a while? statement.

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 12
Consider the following code:
Which statement could be used to determine the value of the first radio button?

A. document.rdoGroup1.value
B. document.myForm.rdoGroup1[0].value
C. document.getElementById(rdoGroup1).value
D. document.getElementById("rdoGroup1").value

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 13
Which choice best defines events and event handlers?

A. An event can be an action initiated by the user, and an event handler specifies how JavaScript will react to
the action.
B. An event is an action initiated by the operating system, and an event handler is a function defined by the
user.
"Pass Any Exam. Any Time." - www.actualtests.com 7
CIW 1D0-635: Practice Exam
C. An event handler can be an action initiated by the user, and an event specifies how JavaScript will react to
the action.
D. An event is initiated by an error in JavaScript, and an event handler will attempt to bypass the error and
continue.

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 14
Consider the following code:

What is the output when you run this script in the browser?
A. An alert box displaying the following: John, Paul, George, Ringo
B. An alert box displaying the following: Ringo, John, Paul, George
C. An alert box displaying the following: Ringo, Paul, George
D. An alert box displaying the following: John, Ringo, George

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 15
Which statement about the JavaScript form object is true?

A. The JavaScript form object has no relationship to the X/HTML <form> element.
B. You can use a single instance of the form object to represent multiple forms on a Web page.
C. The form object cannot be used to access the individual field elements that compose the form.
D. The JavaScript form object is available when the X/HTML <form></form> tags are present in the X/HTML
document.

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com 8


CIW 1D0-635: Practice Exam

QUESTION 16
Consider the following code:

What is the expected result of this script?

A. When you leave the page, the alert box will display.
B. The page will ignore the function, so a blank page will display on entry and exit.
C. When you enter the page, you will be warned that there is unfinished JavaScript to run.
D. When you leave the page, there will be a JavaScript error because you cannot unload an alert box.
Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 17
Which of the following comparison statements will return true?

A. x = 10;
y = 5;
x <= y;
B. x = 10;
y = 5;
x !== "X"
C. x = 10;
y = 5;
x === y;
"Pass Any Exam. Any Time." - www.actualtests.com 9
CIW 1D0-635: Practice Exam
D. x = 10;
y = 5;
x == y;

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 18
Which statement is true about the getElementByID() method?

A. It returns only the first element with the specified ID.


B. It returns an array containing all elements with the specified ID.
C. If a match is not found for the specified ID, it will attempt searching by name.
D. If a match is not found for the specified ID, it will attempt searching by tag name.

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 19
Consider the following code:
Will this function generate an error?

A. No, because the code is well-formed


B. Yes, because the alert syntax is incorrect
C. Yes, because there are no valid variables returned
D. Yes, because the passed arguments have not been defined before the function call "Pass Any Exam. Any
Time." - www.actualtests.com 10
CIW 1D0-635: Practice Exam

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 20
Which script block will display Hello World in the browser when the script is run?

A. <script type="text/javascript">
var message = "Hello ";
var message2 = "World";
document.write(message + message2);
</script>
B. <script type="text/javascript">
var message = "Hello ";
var message2 = "World";
document.write(message & message2);
</script>
C. <script type="text/javascript">
var message = Hello ;
var message2 = World ;
document.write(message + message2);
</script>
D. <script type="text/javascript">
var message = "Hello ";
var message2 = "World";
document.write("message + message2 ");
</script>

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:
QUESTION 21
Which of the following is a browser security issue that JavaScript developers should remember when
developing a script?

A. JavaScript cannot be disabled in the client and will always run.


B. JavaScript functionality is immune to viruses, trojans and malware.
C. JavaScript is a cross-platform scripting language and will generate consistent results regardless of the client
or server being used.
D. Certain JavaScript functionality may be blocked by some browsers, which prevents the script "Pass Any
Exam. Any Time." - www.actualtests.com 11
CIW 1D0-635: Practice Exam
from running as expected for all users.

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 22
Which statement will open this Web document in a new browser window?

A. document.open(http://www.CIWcertified.com);
B. window.open(http://www.CIWcertified.com);
C. window.open("http://www.CIWcertified.com");
D. document.open("http://www.CIWcertified.com");

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 23
Consider the following message displayed in a pop-up window: Welcome to the CIW Web site! Which line of
code will deliver the pop-up window that displays this message?

A. <a href="http://www.CIWcertified.com" onclick()="alert('Welcome to the CIW Web site!')">CIW Web site</


a>
B. <a href="http://www.CIWcertified.com" onclick="alert('Welcome to the CIW Web site!')">CIW Web site</a>
C. <a onclick="http://www.CIWcertified.com","CIW Web site", ('Welcome to the CIW Web site!')" />
D. <a onclick()="http://www.CIWcertified.com","CIW Web site", ('Welcome to the CIW Web site!')" />

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 24
You want to display a series of elements. Which choice demonstrates the correct syntax for an array in
JavaScript?
"Pass Any Exam. Any Time." - www.actualtests.com 12
CIW 1D0-635: Practice Exam

A. var myArray = Array(1,2,3,4,5)


for (var i = 0; i < myArray.[i]; i++ ){
document.write( myArray[i] + "<br />" );
B. var myArray = new Array(1,2,3,4,5)
for (var i = 0; i < myArray.length ; i++ ){
document.write( myArray[i] + "<br />" );
C. var myArray = new Array(1,2,3,4,5)
for (var i = 1; i < myArray.length; i-- ){
document.write( myArray.length + "<br />" );
D. var myArray = Array(1,2,3,4,5)
for (var i = 1; i < myArray.[i] ; i-- ){
document.write( myArray[i] + "<br />" );

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 25
When used in conjunction with SQL, a server-side language (such as PHP) and a database (such as mySQL),
AJAX can perform which of the following database operations?

A. Update the database schema and table relationships


B. Create custom database views and stored procedures
C. Modify database security permissions, including changing the database owner
D. Retrieve information from a database and display it back to the page originating the request

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 26
You want to add a personalized interaction with your users when they enter your Web site. To do this, you can
display a JavaScript prompt on the home page that asks the user to enter her name. When the user enters text
and clicks the OK button, an alert dialog box will appear and display the text "Welcome, name" (where name is
the text entered by the user). Which choice shows the correct JavaScript code for this action?

A. alert("Welcome, " + prompt("What is your name?", ""));


B. alert("Welcome, ") + prompt("What is your name?", "");
C. prompt("What is your name?", "") + alert("Welcome, ");
D. prompt("What is your name?", "" + alert("Welcome, ")); "Pass Any Exam. Any Time." - www.actualtests.com
13
CIW 1D0-635: Practice Exam

Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Explanation:

QUESTION 27
In an X/HTML form, which script block will retrieve an input value and display it back without errors or
warnings?

A. <script type="text/javascript">
function ShowEntry() {
var inp = document.getElementById("i");
var s = inp.value;
B. value = s; }
</script>
<input id="i" onchange="ShowEntry()" /><br />
You entered: <span id="d"></span>
C. <script type="text/javascript">
function ShowEntry() {
document.getElementById("i");
var s = i.innerHTML;
document.getElementsByName("d").innerHTML = s; }
</script>
<input id="i" onchange="ShowEntry()" /><br />
You entered: <span id="d"></span>
D. <script type="text/javascript">
function ShowEntry() {
var inp = document.getElementById("i");
var s = inp.value;
document.getElementsbyName("d").innerHTML = s; }
</script>
<input id="inp" onchange="ShowEntry()" /><br />
You entered: <span id="d"></span>
E. <script type="text/javascript">
function ShowEntry() {
var inp = document.getElementById("i");
var s = inp.value;
document.getElementById("d").innerHTML = s; }
</script>
<input id="i" onchange="ShowEntry()" /><br />
You entered: <span id="d"></span>

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com 14


CIW 1D0-635: Practice Exam

QUESTION 28
Which statement will return the name of the browser being used to view the script?

A. navigator.appName
B. navigator.platform
C. navigator.userAgent
D. navigator.appVersion

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 29
Which choice demonstrates the correct syntax for declaring a variable?

A. var last name;


B. var &lastname;
C. var "lastname";
D. var lastName;

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 30
Consider the following code:

What will this alert display?

A. It is currently dark in the room


B. It is currently bright in the room
C. It is currently in the room
"Pass Any Exam. Any Time." - www.actualtests.com 15
CIW 1D0-635: Practice Exam
D. It is currently bright : dark in the room

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:
Exam B

QUESTION 1
Consider the following code:

What is the expected result when you run this script in the browser?

A. A window alert box will display Hello.


B. A window alert box will display Goodbye.
C. No window alert box will appear because there is an error in the code.
D. A window alert box will display Hello then a second alert box will display Goodbye.

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 2
Consider the following code:

What is the appropriate parameter for the alert() method in line 5 to reference the text in the firstName text
box?

A. document.myForm.value(firstName)
B. document.myForm.firstName.value
"Pass Any Exam. Any Time." - www.actualtests.com 16
CIW 1D0-635: Practice Exam
C. window.myForm.firstName.value
D. window.myForm.text(firstName)

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 3
Consider the following code:
When an invalid e-mail address is entered, an alert is displayed to the user, but the form submission is not
interrupted. What changes need to be made to the script in order to abort the submission if an invalid e-mail
address is entered?

A. Add return false after the alert() statement.


B. Change return to validate in the function call.
C. Add validate false after the alert() statement.
D. Remove the return keyword from the function call and put it in front of the alert() statement.

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 4
Consider the following code:

"Pass Any Exam. Any Time." - www.actualtests.com 17


CIW 1D0-635: Practice Exam
What output will appear in the browser when you run this script?

A. "1, 2, 3, 4, 5, 6, 7, 8, 9"
B. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
C. 1, 2, 3, 4, 5, 6, 7, 8, 9,
D. "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 5
Suppose you define two variables as follows:

var x = 5;

var y = "5";

Which statement will return the mathematical sum of these variables?

A. alert(x + int(y));
B. alert(x + parseInt(y));
C. alert(x + y);
D. alert((int)x + (int)y);

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 6
Consider the following code:

What is the expected result when you run this script in the browser?

"Pass Any Exam. Any Time." - www.actualtests.com 18


CIW 1D0-635: Practice Exam

A. A window alert box will display Hello.


B. A window alert box will display Goodbye.
C. No window alert box will appear because there is an error in the code.
D. A window alert box will display Hello then a second alert box will display Goodbye.

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 7
Consider the following statement:

for (X; Y; Z)

What does Z represent in this code?

A. The counter variable


B. The loop counter update expression
C. The condition under which the loop will execute
D. The highest value that the counter variable may reach

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 8
Which of the following is a practice associated with the security risk known as cross-site scripting (XSS)?

A. Inserting JavaScript code in a URL query string to perform an unintended or malicious action
B. Using a look-alike site to impersonate a trusted site so the user will enter sensitive information
C. Using a certificate authority validation to persuade users to accept a specialized script that can override
certain security restrictions in thebrowser
D. Launching a JavaScript statement that has no conditions for ending, thus requiring the user to close the
browser in order to end the script

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com 19


CIW 1D0-635: Practice Exam

QUESTION 9
What is the purpose of the prototype property in JavaScript?

A. It is used to add properties or methods to a JavaScript object.


B. It returns a list of properties and methods of a JavaScript object.
C. It enables developers to create JavaScript code from a specially formatted prototype flowchart document.
D. It is used to create usage examples of custom objects because its output is not evaluated by the JavaScript
interpreter.

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:
QUESTION 10
Which example correctly implements inline scripting with JavaScript?

A. <input type="button" value="Click Here!" onclick=" " />


B. <input type="button" value="Click Here!" onclick="myGreeting();" />
C. <input type="button" value="Click Here!" onclick="alert('Hello World! '); " />
D. <input type="button" value="Click Here!" />

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 11
Consider the following code:

var myString= "Hello World";

alert(myString.length);

What is the output when you run this script in the browser?

A. An alert box displaying the following: "Hello World", 11


B. An alert box displaying the following: myString, 11
C. An alert box displaying the following: Hello World
D. An alert box displaying the following: 11
"Pass Any Exam. Any Time." - www.actualtests.com 20
CIW 1D0-635: Practice Exam

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 12
Consider the following code:

What needs to be changed to allow this script to run without error?

A. Change the substring method call to substr


B. Change the substring method call to substr()
C. Change the characterAt method call to charAt
D. Change the characterAt method call to characterat

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 13
Which of the following is a reason why a developer would use a JavaScript library?

A. JavaScript libraries ensure quality code that does not harbor security risks.
B. JavaScript libraries require a shorter learning curve than JavaScript.
C. JavaScript libraries are subsets of Java and thus provide more powerful code.
D. JavaScript libraries provide platform-independent code that will behave identically in any browser.

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com 21


CIW 1D0-635: Practice Exam

QUESTION 14
Which of the following will correctly declare the EmployeeID variable as a string data type?

A. string EmployeeID = 123;


B. string EmployeeID = "123";
C. var EmployeeID = 123;
D. var EmployeeID = "123";

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 15
Which of the following will correctly modify the value of an X/HTML element's attribute within the DOM?

A. getAttribute(NewValue, AttributeName)
B. getAttribute(AttributeName, NewValue)
C. setAttribute(NewValue, AttributeName)
D. setAttribute(AttributeName, NewValue)

Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Explanation:

QUESTION 16
Consider the following select list:

Which of the following will select the third option in the list?

"Pass Any Exam. Any Time." - www.actualtests.com 22


CIW 1D0-635: Practice Exam

A. var list = document.getElementById("numlist");


list.selected = 3;
B. var list = document.getElementById("numlist");
list.options[2].selectedIndex();
C. var list = document.getElementById("numlist");
list.options.selectedIndex = 2;
D. var list = document.getElementById("numlist");
list[3].selected(true);

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 17
How is the alert() method different from prompt() and confirm()?

A. The alert() method generates a modal dialog box, which requires user action before the next JavaScript
instruction can be executed,whereas prompt() and confirm() do not.
B. The alert() method requires only one parameter, whereas prompt() and confirm() require two parameters.
C. The alert() method requires two parameters, whereas prompt() and confirm() require only one parameter.
D. The prompt() and confirm() methods return a value, whereas alert() does not.

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 18
Maria, a 22-year old student, is testing her JavaScript application, which includes the following code:
Assuming Maria enters truthful information, what is the value of z after executing this code?

A. No value ?error in line 1 due to missing var keyword for userAge.


B. No value ?error in line 1 due to multiple declarations in one line.
C. Maria "is" 22 "years old"
D. Maria is 22 years old
"Pass Any Exam. Any Time." - www.actualtests.com 23
CIW 1D0-635: Practice Exam

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

http://www.gratisexam.com/

QUESTION 19
Consider the following code:

When a user clicks on the displayed link, which site will he navigate to?

A. www.msn.com
B. www.yahoo.com
C. www.google.com
D. No other site, because there is a runtime error

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 20
Consider the following code using a checkbox object:

Which checkbox property was used by JavaScript?

A. checked
"Pass Any Exam. Any Time." - www.actualtests.com 24
CIW 1D0-635: Practice Exam
B. onclick()
C. checkThis
D. z-index

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 21
Jane has created a file with commonly used JavaScript functions and saved it as "allFunctions.js" in the
application's root directory. She wants to load this file into a Web page to access its functions. Which statement
shows the correct syntax to do this?

A. <script link="text/javascript" href="/allFunctions.js"> </script>


B. <script link="javascript/external" href="/allFunctions.js"> </script>
C. <script type="text/javascript" src="/allFunctions.js"> </script>
D. <script type="text/@linked" javaScript="allFunctions.js"> </script>

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:
QUESTION 22
Consider the following code:

A. Replaces the text CIW with the text http://www.CIWcertified.com


B. Replaces the text CIW with a link that reads myLink and points to the URL www.CIWcertified.com
C. Converts the text CIW into a link that reads CIW and points to the URL www.CIWcertified.com
D. Returns true if the content of the <span> is a link to www.CIWcertified.com, or returns false if the content of
the <span> is not a link to
www.CIWcertified.com

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
"Pass Any Exam. Any Time." - www.actualtests.com 25
CIW 1D0-635: Practice Exam

Explanation:

QUESTION 23
Consider the following declaration of a custom object:

What needs to be changed to allow this script to run without error?

A. You must remove the car_ prefix on the parameters.


B. You must change the declaration syntax to object carObj.
C. You must add the this keyword to the variables on the left side of the assignments.
D. You must add the keyword var to each line inside the function.

Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Explanation:

QUESTION 24
Consider the following code:

What is the expected output when you run this script in a browser?

A. A button labeled Click Me will appear, with an input box that displays the following default text:
Old Value. Upon clicking the button, the textin the text box will change to New Value. Upon clicking the
button again, the text in the text box will change back to Old Value.
B. A button labeled Click Me will appear, with an input box that displays the following default text:
Old Value. Upon clicking the button, the text inthe text box will change to New Value. Upon clicking the
button again, the text in the text box will change to Old Value, New Value.
C. A button labeled Click Me will appear, with an input box that displays the following default text:
Old Value. Upon clicking the button, the text inthe text box will change to New Value. Upon clicking the
button again, you will see nothing change.
"Pass Any Exam. Any Time." - www.actualtests.com 26
CIW 1D0-635: Practice Exam
D. This script will not run. You will get an error because the value="Old Value" statement in the <input> tag
contains the reserved wordValue within the quotes.

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Explanation:

QUESTION 25
You are developing a Web page for your company's site, and you plan to use a library plug-in from the jQuery
library. Which choice describes the proper steps for using the plug-in?

A. After locating the plug-in that you want to use, you then copy the code from the jQuery site and paste it into
your CSS file using the <script>tag.
B. After locating the plug-in that you want to use, you then download the EXE file and install it on your browser.
The plug-in will take effect afteryou restart the browser.
C. After locating the plug-in that you want to use, you download the plug-in, compile the code and upload it to
your server, then you reference thecompiled code with a <script> tag in your X/HTML file.
D. After locating the plug-in you want to use, you add to your X/HTML file a <script> tag referencing the jQuery
library and a <script> tagreferencing the external plug-in file.

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com 27


http://www.gratisexam.com/

Potrebbero piacerti anche