📄 questions.js
字号:
new question("d", "Sneaky, but true.", "navigator.platform indicates 'Win16', but you are running Win NT. What gives?", "Impossible. This is a sick joke.", "The userAgent property reflects the correct OS.", "The property can be modified.", "navigator.platform shows the OS for which the browser was compiled."),
new question("d", "Using the <FONT FACE=Courier>preference()</FONT> method requires that the user grant permission based on credentials of the owner contained in the signed script.", "You unsuccessfully use navigator.preferences() to alter browser preferences. How come?", "You\'re using export instead of import.", "You\'re using import instead of export.", "That\'s the wrong method.", "You\'re not using a signed script."),
new question("b", "The <FONT FACE=Courier>delete</FONT> operator was added in JavaScript 1.2.", "How do you delete an element from an array with JavaScript 1.2?", "Set it to false.", "Use the delete operator.", "Set it to undefined.", "Set it to -1."),
new question("c", "All the other properties are assignable.", "Choose the read-only property:", "images[index].src", "layers[index].right", "layers[index].parentLayer", "links[index].target"),
new question("c", "substring() accepts as many as two arguments- the first character index to copy and the last character index to copy. <FONT FACE=Courier>substr()</FONT> also accepts the first argument as the first character index to copy, but accepts a string length as the second argument.", "How do substring() and substr() differ?", "One is not a method of the String object.", "substr() takes three arguments, substring() only two.", "Only one accepts a desired string length as an argument.", "Besides the spelling, nothing."),
new question("a", "Completely invented. Not to be confused with <FONT FACE=Courier>String</FONT> object method <FONT FACE=Courier>fromCharCode()</FONT>.", "What\'s wrong with this: var charConvert = atCharCode('x');", "atCharCode() is a bogus method.", "Nothing. I use it all the time.", "atCharCode accepts only numbers.", "atCharCode takes no arguments."),
new question("d", "The <FONT FACE=Courier>Checkbox</FONT> object has no constructor.", "Choose the external object:", "Date", "Option", "Layer", "Checkbox"),
new question("b", "The other three are external objects.", "Choose the built-in object:", "Password", "Math", "Link", "Hidden"),
new question("b", "<FONT FACE=Courier>exec()</FONT> is a method of the <FONT FACE=Courier>RegExp</FONT> object. The other three are available to all objects.", "Which is not a global object method?", "toString()", "exec()", "typeOf()", "eval()"),
new question("b", "JavaScript considers a variable with a null value equal to zero", "What is the equivalent of null in a JavaScript arithematic operation?", "NaN", "zero", "undefined", "false"),
new question("c", "How many times have you seen this happen in a JavaScript error?", "Which would JavaScript assign to an uninitialized variable?", "NaN", "null", "undefined", "false"),
new question("b", "<FONT FACE=Courier>this</FONT> is technically a built-in object.", "Which is not considered a JavaScript operator?", "new", "this", "delete", "typeof"),
new question("a", "None of the others really comes close.", "Choose the best pattern for the string: 840-21-3688", "/\\d+-\\d{2,}-?\\d*/ /*", "/\\w+-\\w+-\\w+/", "/\\d+\\d+\\d+/", "/\\d+-\\d?-\\d+/"),
new question("a", "The others are external objects.", "Choose the built-in JavaScript object:", "Image", "mimeType", "Password", "Area"),
new question("a", "The other three have constructors.", "Choose the external object:", "Hidden", "Option", "Layer", "Function"),
new question("b", "<FONT FACE=Courier>prototype</FONT> is a property, not a method.", "How would you add a property to an object class?", "With the prototype() method.", "With the prototype property.", "Sorry. Can\'t be done.", "With the this object."),
new question("d", "<FONT FACE=Courier>arguments.length</FONT> returns the actual number of arguments received, not the number expected.", "Which property returns the number of arguments expected by a function?", "arguments.length", "Function.caller", "Function.display", "Function.arity"),
new question("c", "The word program sounds good, but is not reserved.", "Which is not a reserved word?", "interface", "short", "program", "throws"),
new question("a", "<FONT FACE=Courier>enabledPlugin</FONT> returns a reference to the plugin object that supports the corresponding MIME type (if it is installed).", "Select the property that doesn't hold a Boolean value:", "MimeType.enabledPlugin", "option.defaultSelected", "form.reset.enabled", "image.complete"),
new question("c", "Even if you pass nothing, <FONT FACE=Courier>open()</FONT> has a hunch that you will be writing HTML.", "What\'s the default string passed to document.open()?", "application/pdf", "image/gif", "text/html", "text/plain"),
new question("b", "LiveConnect permits communication among JavaScript, Java, and plug-ins.", "What allows JavaScript to access methods and properties of a Java applet?", "The Java console", "LiveConnect", "LiveWire", "LiveWire Pro"),
new question("b", "<FONT FACE=Courier>domain</FONT> yes; <FONT FACE=Courier>host</FONT> no.", "Which is not an attribute of the cookie property?", "path", "host", "secure", "domain"),
new question("b", "If you want to split hairs, you can also not assign the <FONT FACE=Courier>expiry</FONT> attribute and let the cookie die after the browser session.", "How do you delete a cookie?", "You can\'t. They\'re valid until they expire.", "Overwrite it with an expiry date in the past.", "escape() the value of the path attribute.", "unescape() the value of the path attribute."),
new question("c", "All the others are simply untrue.", "Which cookies.txt filesize is too large?", "1K", "3K", "5K", "There is no theoretical limit."),
new question("d", "This prevents the mischevious from storing gigabytes of information on your hard drive.", "What happens to the document.cookie data if it exceeds the maximum size?", "Your script automatically generates a run-time error.", "Your script automatically generates a load-time error.", "All processes using document.cookie are ignored.", "The cookie is truncated to the maximum length."),
new question("b", "This only happens in nested tables. NN4.x corrects the problem.", "You\'ve embedded the document.write() method to write some text within a pair of <TD></TD> table tags. Upon loading the file, however, you get some garbled junk on the page where that text should be. What browser are you most likely using?", "MSIE 2.x", "Netscape Navigator 3.x", "Netscape Navigator 4 beta 2", "MSIE 3.02"),
new question("a", "Choice b could go too high. Choice c does not return an integer. Choice d does not even access the array", "How would you randomly choose an element from an array named myStuff if the number of elements changes dynamically?", "randomElement = myStuff[Math.floor(Math.random() * myStuff.length)];", "randomElement = myStuff[Math.ceil(Math.random() * myStuff.length)];", "randomElement = myStuff[Math.random(myStuff.length)];", "randomElement = Math.random(myStuff.length);"),
new question("d", "Both work well for 3.x browsers.", "With the advent of JavaScript1.2, the String.replace() method facilitates character replacement in strings. How would you remove every \'x\' from the variable myString without the new features of 1.2?", "for(var i = 0; i < myString.length; i++) {<BR> if(myString.charAt(i) != \'x\') {<BR> myStringCopy += myString.charAt(i);<BR> }<BR> }<BR> myString = myStringCopy;", "var myArray = myString.split(\'x\'); myString = myArray.join(\'\');", "It wasn't possible until now. Thanks JavaScript1.2\!", "The first two both work fine."),
new question("a", "If you do not include MAYSCRIPT in the APPLET tag, LiveConnect cannot do its thing.", "What HTML attribute allows a Java applet explicit permission to access JavaScript objects and functions?", "MAYSCRIPT", "CODE", "PARAM", "CODEBASE"),
new question("b", "Another contrived item. Oh, the humanity.", "Which is not a package of the Java class hierarchy available in Navigator?", "netscape", "javasoft", "sun", "java"),
new question("a", "They are all there, but only choice a has the correct order.", "Choose the four symbol pairs that represent RegExp properties lastMatch, lastParent, leftContext, and rightContext, respectively:", "$&, $+, $`, $'", "$+, $&, $', $`", "$&, $~, $`, $'", "$+, $&, $`, $'"),
new question("b", "<FONT FACE=Courier>pattern.global</FONT> returns a Boolean value indicating if the regular expression performs global (all) matches in a string.", "Consider three variables: <BR><BR><BLOCKQUOTE>someText = 'JavaScript1.2';<BR>pattern = /(\\w+)(\\d)\\.(\\d)/i;<BR>outCome = pattern.exec(someText);</BLOCKQUOTE><BR>What does pattern.global contain?", "true", "false", "undefined", "null"),
new question("a", "<FONT FACE=Courier>pattern.ignoreCase</FONT> returns a Boolean value indicating if the regular expression performs case-sensitive matches.", "Consider three variables: <BR><BR><BLOCKQUOTE>someText = 'JavaScript1.2';<BR>pattern = /(\\w+)(\\d)\\.(\\d)/i;<BR>outCome = pattern.exec(someText);</BLOCKQUOTE><BR>What does pattern.ignoreCase contain?", "true", "false", "undefined", "null"),
new question("c", "The only match is the string JavaScript1.2.", "Consider three variables: <BR><BR><BLOCKQUOTE>someText = 'JavaScript1.2';<BR>pattern = /(\\w+)(\\d)\\.(\\d)/i;<BR>outCome = pattern.exec(someText);</BLOCKQUOTE><BR>What does outCome[0] contain?", "true", "false", "JavaScript1.2", "null"),
new question("a", "It does no harm, but looks weird.", "After clicking on a link, your main browser window spawns a small new window and writes some text to it. However, when viewing both window page sources, the small window page source is identical to that of the large. How can this be?", "The function writing to the new window didn\'t close the document stream.", "Gimme a break. It\'d never happen.", "Windows receive the source code of the window that wrote to them.", "Since the new window has no filename, it receives the source code of its parent."),
new question("d", "Just another dirty ploy to make you choose from a group of wrong answers.", "Choose another way to write x ? a = b : a = c", "if (\'x\') { a = b; } else { a = c; }", "if (x) { a = c; } else { a = b; }", "x : a = c ? a = b", "All of these are bogus."),
new question("c", "<FONT FACE=Courier>exec()</FONT> belongs to the <FONT FACE=Courier>RegExp</FONT> object.", "Which of these is not a method of the Math object?", "atan()", "atan2()", "exec()", "acos()"),
new question("a", "How do you give a hidden field focus, anyway?", "Choose the object associated with the onFocus event handler:", "Password", "Hidden", "Both", "Neither"),
new question("a", "The <FONT FACE=Courier>window</FONT> object does not listen for it.", "Choose the object associated with the onMouseOut event handler:", "Layer", "Window", "Both", "Neither"),
new question("a", "You can load documents into <FONT FACE=Courier>Layer</FONT>s all day, but onUnLoad never happens.", "Choose the object associated with the onUnLoad event handler:", "Window", "Layer", "Both", "Neither"),
new question("d", "Neither is associated with <FONT FACE=Courier>onBlur</FONT>.", "Choose the object associated with the onBlur event handler:", "Image", "Document", "Both", "Neither"),
new question("a", "Only the <FONT FACE=Courier>document</FONT> object is associated.", "Choose the object associated with the onKeyPress event handler:", "document", "Layer", "Both", "Neither"),
new question("a", "The <FONT FACE=Courier>type</FONT> property would reveal that this is a multiple SELECT list.", "Consider the following HTML: <BR><BR><FORM><BR> <SELECT MULTIPLE><BR> <OPTION>This one<BR> <OPTION>That one<BR> </SELECT><BR></FORM><BR><BR>What does alert(document.forms[0].elements[0].type) display?", "select-multiple", "form element", "select", "multiple"),
new question("b", "JavaScript is, in fact, a dynamically-typed language. So variable types can be changed on the fly.", "JavaScript does not support dynamic data typing.", "True", "False", "True as of JavaScript 1.2.", "False as of JavaScript 1.2.")
);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -