You want to save the user name in your Web site using a cookie. Which code example correctly
accomplishes this? - Answers document.cookie = "userName = Raul";
You created a Web page containing a form for users to join your company's mailing list. You
need to validate user input with the minimum amount of bandwidth. Which technology should
you use? - Answers Client-side JavaScript
Consider the following code:
var streetLight = 'green';
var drive = (streetLight !== 'green') ? "go" : "stop";
alert("The street light says " + drive);
What will the alert box display when this script is run in the browser? - Answers The street light
says stop
What is the purpose of a debugger? - Answers Debuggers detect and locate errors so you can
manually fix them.
What is the purpose of the with statement in JavaScript? - Answers To save time when
referencing the same object multiple times
What is the name for Microsoft's implementation of JavaScript? - Answers JScript
What is null? - Answers A keyword for the null value, which is no value
Which attribute of the <script> tag was deprecated in HTML 4.0? - Answers language
Which JavaScript event handler would NOT be called when the user clicks between radio
buttons? - Answers onselect
Which JavaScript object reflects information about the browser being used to view the Web
page? - Answers navigator
Consider the following line of code:
parseInt("C");
, What would be the result of this code? - Answers NaN
Which of the following is required to enable JavaScript to interact with a text box? - Answers
The text box must be nested within X/HTML <form> tags.
Which language is typically used to query databases in AJAX transactions? - Answers SQL
Using browser detection may seem to solve the browser-compatibility problems of your Web
pages. However, it has some disadvantages, which of the following is a disadvantage of using
browser detection for the purpose of browser compatibility? - Answers Your detection results
may exclude mobile devices.
Consider the following code:
var nurseryRhyme = "Mary had a little lamb";
alert(nurseryRhyme.substring(3, 12));
What will the alert display when this script is run in the browser? - Answers y had a l
Which property of the options object represents the text between the <option> and </option>
tags? - Answers text
Which JavaScript object can trigger the onerror event handler? - Answers image
You have created a function called fnValidate() to validate a form's input. You want the
validation to happen when the user leaves a text box. What is the correct declaration for the text
box? - Answers <input type="text" name="myText" onblur="fnValidate(this.value);" />
Consider the following code:
var firstArray = ["Sabrina", "Kelly", "Jill"]
var secondArray = firstArray.shift();
alert(secondArray);
What is the output when this script is run in the browser? - Answers An alert box that displays:
Sabrina
Consider the following code using a radio object: