All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer science
javascript
Questions and Answers of
JavaScript
The syntax you use to select elements in a jQuery statement is essentially a concise version of which JavaScript method?a. getElementById()b. getElementsByClassName()c. getElementsByTagName()d.
Which option property do you add to a getCurrentPosition() request to specify a length of time to wait before cancelling the request?a. enableHighAccuracyb. timeoutc. maximumAged. coords
Why should you avoid including jQuery in a project if you don’t need it?
What are the components of an event listener using jQuery?
Why should you ensure that the script element that links to the jQuery library file comes before any other script element for a .js file that includes jQuery code?
What is the difference between calling a jQuery method with and without parameters?
What is an alias? What is the role of an alias in jQuery?
Which is an advantage of using jQuery animation methods rather than coding animations yourself in JavaScript?a. Coding the animations yourself might require writing and debugging many lines of
Some jQuery animation methods accept which keywords to set the speed of the animation? a. Up or downb. Slow or fastc. Left or rightd. True or false
All jQuery animation methods can take a value in ____________ to specify the length of the animation.a. Minutesb. Secondsc. Microsecondsd. Milliseconds
Which of the following is a jQuery animation method?a. focus()b. addClass()c. children()d. show()
Which is the correct syntax to create a function that uses jQuery?a. $(function) name() {}b. $.function name() {}c. function name() {}d. $(name()).function {}
Which is not part of a jQuery statement to create a backward-compatible event listener?a. The jQuery aliasb. A selector for the element(s) associated with the eventc. A method that specifies the
What action does a jQuery event method perform if it is called with empty parentheses?a. It does nothing.b. It creates an event listener on the window object.c. It removes any matching event listener
Which jQuery method do you use to add a class name to one or more selected elements?a. clone()b. addClass()c. html()d. removeClass()
Which of the following selects all p elements in a document? a. $("p")b. #("p")c. $.("p")d. #.("p")
Every jQuery statement begins with which character? a. #b. $c. .d. {
What is the first step in using jQuery?a. Link the .js file that contains the library to your HTML document.b. Create a selector.c. Enter a method name.d. Enter method parameters.
Instead of hosting your own copy of the jQuery library, you can link an HTML document to a copy of the jQuery file ________.a. On the W3C websiteb. On a CDNc. On the WHATWG websited. In the style
How do you select elements in jQuery?
What is a difference between jQuery 1.x and jQuery 2.x?a. Only jQuery 1.x is written in JavaScript.b. Only jQuery 2.x works with modern browsers.c. Only jQuery 1.x supports IE 6, 7, and 8.d. jQuery
What is the difference between using the jQuery addClass() method and the show() method to display an element with the display property value set to none?
How does every jQuery statement start?
What language is the jQuery library written in?a. CSSb. JavaScriptc. HTMLd. PHP
What argument do all jQuery animation methods take?
What is the first step in using jQuery in a project?
Explain why incorporating content from another domain using JSON-P opens a potential security hole in your website.
Why do you not normally send a Connection header with a value of close?
Why do you need to run an app using Ajax from a web server to test it rather than opening it as a local file?
What is the difference between a standard HTTP request and a request that uses the XMLHttpRequest object?
Explain how a proxy is used for an Ajax request.
Which response header is used by CORS?a. Varyb. Serverc. Access-Control-Allow-Origind. Location
Which of the following does a JSON-P request use?a. An XMLHttpRequest objectb. Ascript elementc. A proxyd. A meta element
Which method of updating content involves the server for a web service explicitly indicating that data may be used on other domains?a. Ajaxb. Ajax with a proxyc. JSON-Pd. CORS
When using an asynchronous request, you cannot process the response until the readyState property is assigned a value of __________.a. 1b. 2c. 3d. 4
Which type of request allows JavaScript to continue processing while it waits for a server response?a. Synchronousb. Asynchronousc. JSONd. XML
Which type of request stops processing JavaScript code until a response is returned from the server?a. Synchronousb. Asynchronousc. JSONd. XML
Which property of an XMLHttpRequest object contains a JSON string returned from a web service?a. Valueb. Innerhtmlc. Responsexmld. Responsetext
An HTTP response code indicating a successful request begins with which digit?a. 1b. 2c. 3d. 4
The temporary storage of data for faster access is known as __________.a. Parsingb. Cachingc. A requestd. A response
A web server’s reply when a user’s browser asks for a web page is known as a(n) __________. a. Headerb. Requestc. Responsed. Host
When a user’s browser asks a web server for a web page, the process is known as a(n) __________.a. Headerb. Requestc. Responsed. Host
Which of the following is the first step in using Ajax to update data?a. Receive the response from the server, containing the requested data.b. Process the data returned from the server and
A data source made available on one domain for use on other domains across the web is a(n) __________.a. Serverb. Web servicec. HTTP serverd. HTTP client
Describe the potential security implications of using JSON-P.
To ensure that your script continues running if a server problem occurs, should you use a synchronous or asynchronous request? Why?
What XMLHttpRequest property references the non-XML results of an HTTP request?
Explain the meaning of the HTTP status codes 304 and 404.
Explain the relationship between a proxy and JavaScript’s same-origin policy when creating an Ajax request.
A server that acts for or performs requests for other clients and servers is a(n) ___________.a. Proxyb. Ajaxc. Requestd. Response
List at least one advantage and one disadvantage of using XHR with a proxy, JSON-P, and CORS.
What is the difference between a synchronous and an asynchronous request?
What method should you call before beginning a new HTTP request using an existing XMLHttpRequest object, and why?
What is the function of the Cache-Control header, and what value should you generally specify for this header when requesting data with Ajax?
What does the XMLHttpRequest object do?
Which object uses HTTP to exchange data between a client computer and a web server?a. JSONb. Mathc. XMLHttpRequestd. Ajax
What is JSON-P? What is CORS?
What is the first step in working with the contents of a JSON string returned as the value of the responseText property?
What is the purpose of keeping an HTTP connection open and reusing it, rather than closing it?
How many lines does an HTTP message have, and what is the content of each line?
Name two data formats that can be used with Ajax.
Explain how to load a script responsively.
What is a gyroscope? What is an accelerometer? Explain how data from these devices can be useful in a web app.
Explain the roles of the Geolocation API and the Google Maps API in displaying a map showing a user’s current position in your app.
Why is it useful to add a timeout to a getCurrentLocation() request using the setTimeout() method of the Window object?
What is a touch cascade?
__________ removes comments, indents, and line breaks, and tweaks code in other ways to make it smaller.a. Minifying filesb. Responsively loading scriptsc. Implementing the Geolocation APId.
A(n) __________ waits for something else to happen before running.a. Minifierb. Prettifierc. Asynchronous callbackd. Synchronous callback
Which API enables apps to receive data from a device’s camera and microphone, as well as to send and receive audio, video, and other types of data in real time?a. Geolocation APIb. Battery Status
Which API provides access to data from a device’s gyroscope and accelerometer?a. Geolocation APIb. Battery Status APIc. Device Orientation APId. WebRTC API
Which API provides access to properties and methods related to the device battery?a. Geolocation APIb. Battery Status APIc. Device Orientation APId. WebRTC API
If your browser does not ask whether you want to share your location information while testing an app that uses geolocation, you may need to ________.a. Implement touch eventsb. Implement pointer
Converting a physical address to a pair of latitude and longitude coordinates is known as __________.a. Minifyingb. Geolocationc. A callbackd. Geocoding
The success and fail arguments of the getCurrentPosition() method, which are executable code, are examples of ___________.a. Callbacksb. Propertiesc. API keysd. Minifiers
You can access methods of the Geolocation API using the geolocation property of the __________ object.a. Windowb. Screenc. Navigatord. Document
In the touch events model, which of the following is an array containing the coordinates of all touches on the current element?a. touchesb. targetTouchesc. changedTouchesd. touchesXY
__________ devices allow for multiple touches on the screen at the same time.a. Pointerb. Desktopc. Touchpadd. Multitouch
What does it mean to minify a file?
Why do you need to use an additional API, such as the Google Maps API, to display a map based on geolocation information?
Why do touch events not support clientX and clientY properties? What do they use instead of these properties?
Mobile devices use touch to perform browser and device interactions, known as __________, for activities such as scrolling the page.a. Touchesb. Pointsc. Clicksd. Gestures
Why is it important to minimize the download size of your mobile web app?
Why is it useful to add a second timeout to supplement the timeout in the getCurrentPosition() method?
What is the difference between touch events and pointer events?
Which type of events aim to handle input from a mouse, finger, or stylus with each event?a. Mouse eventsb. Touch eventsc. Pointer eventsd. Drag events
Why is it useful to test mobile web apps on services that run on a desktop computer?
What is the parent object of the geolocation property?
What is a touch cascade?
Which type of events focus on responding to finger touches on a touchscreen?a. Mouse eventsb. Touch eventsc. Pointer eventsd. Drag events
Explain what a code injection attack is, and one step you can take to prevent such attacks.
Describe one advantage and one disadvantage of using Web Storage rather than cookies.
Explain how to modify an existing cookie.
What is the difference between temporary and persistent cookies?
Why should a password never be stored in a cookie?
It’s important to __________ characters in form field values that could be part of malicious code, which involves converting the characters to their character code equivalents.a. Encryptb.
An attack in which a program or user enters JavaScript code that changes the function of a web page is known as a(n) __________ attack.a. Code injectionb. Secure codingc. Cross-sited. SSL
Your first line of defense in securing your JavaScript programs is to _________.a. Require a login for every userb. Validate all user inputc. Encode all datad. Restrict access to a single subdomain
Which method do you use to delete a specific item from Web Storage?a. clear()b. getItem()c. removeItem()d. setItem()
Which property of the Web Storage API do you use to store data that remains until you run code to delete it, similar to persistent cookies?a. Localstorageb. Sessionstoragec. Persistentstoraged.
To delete cookies in your code, you change the value of which cookie attribute?a. Pathb. Domainc. Expiresd. Name
Showing 1 - 100
of 386
1
2
3
4