Test Series - html

Test Number 49/72

Q: Which of the following is not a method of AJAX?
A. get()
B. getJSON()
C. post()
D. stop()
Solution: AJAX is basically used for exchanging data with server. There are several methods in jQuery for AJAX. Ajax(), ajaxSetup(), ajaxPrefilter(), ajaxTransport(), getJSON(), post(), ajaxSend(), ajaxError(), load(), serializeArray(), serialize(), ajaxStop(), ajaxStart() are some of the methods.
Q: Correct syntax for $.post() method is ____________
A. $.post(URL,data,callback)
B. $.post(URL,data)
C. $.post(URL,callback)
D. $.post(data,callback)
Solution: The correct syntax for $.post() method is $.post(URL,data,callback). URL is the URL we want to request for. Callback is the name of the function that is to be executed. Data specifies the data that is to be send with the request.
Q: The method releases jQuery’s control of $ is __________
A. $.param()
B. $.noConflict()
C. each()
D. data()
Solution: $.noConflict() method releases control of $ in jQuery. A reference to jQuery is returned by noConflict() method. E.g. var ty=$.noConflict(); ty(document).ready(function()) { ty(“button”).click(function() {ty(“h”).text(“It is working!”);}); });. $.param() jQuery AJAX method is the representation of an object or array. An each() method particularize function to run for every matched element. data() method either connects data to selected elements or get data from them.
Q: In JavaScript, which one is used to finding the non-whitespace characters?
A. d
B. s
C. S
D. w
Solution: There are metacharacters defined in JavaScript. S is used to find the non-whitespace character. d is used for finding a digit. s is used for finding whitespace character. w is used to find word character. W is used to find non word character.
Q: Which one is not regular expression object method?
A. test()
B. exec()
C. compile()
D. each()
Solution: compile(), toString(), exec(), test() are some of the regular expression methods in JavaScript. Compile() is method that compiles regular expression. Test() method is for matching in a string. Exec() is also for matching in a string but it returns first match. toString() method returns string value.
Q: Which is not a JavaScript global function?
A. compile()
B. eval()
C. decodeURI()
D. isNaN()
Solution: There are various global functions in JavaScript, decodeURI(), escape(), isFinite(), eval(), isNaN(), encodeURI(), decodeURIComponent(), encodeURIComponent(), isFinite(), is NaN(), parseFloat(), String(), parseInt(), unescape() are some of the methods.
Q: Which of the following is not window object property?
A. defaultStatus
B. closed
C. constructor
D. frames
Solution: Window object properties are frames, history, frameElement, defaultStatus, closed, innerHeight, document, innerWidth, location, name, outerHeight, outerHeight, opener, pageXOffset, parent, screenTop, screen, screenLeft, screen, scroll, status, self, sessionStorage, top.
Q: Which of the following is not window object method?
A. blur()
B. close()
C. confirm()
D. unescape()
Solution: Some of the window object methods are atob(), close(), focus(), blur(), alert(), clearInterval(), confirm(), btoa(), getComputedStyle(), open(), moveTo(), prompt(), matchMedia(), moveBy(), getSelection(), scroll(), setInterval(), stop(), setTimeout() etc.
Q: Which of the following is not navigator object property?
A. appVersion
B. geolocation
C. document
D. cookieEnabled
Solution: The navigator object properties are appVersion, cookieEnabled, appCodeName, geolocation, appName, product, userAgent, platform, online, language. Engine name of the browser is returned by product and the language of the browser is returned by language.
Q: Which of the following is the Navigator object method?
A. javaEnabled()
B. moveBy()
C. scroll()
D. stop()
Solution: There are two navigator object methods namely taintEnabled() and javaEnabled(). taintEnabled() the ability of the browser of data tainting. This method can’t be used in JavaScript 1.2 version. javaEnabled() method specifies whether Java is enabled in the browser or not.

You Have Score    /10