20 classic AJAX interview questions (must know and know)
1. What is AJAX and why should we use Ajax (please talk about your understanding of Ajax)
What is ajax:
AJAX is the abbreviation of "Asynchronous JavaScript and XML". It refers to a web development technology for creating interactive web applications.
Ajax includes the following technologies:
Based on web standards (standards-basedpresentation) XHTML CSS representation;
Using DOM (Document ObjectModel ) for dynamic display and interaction;
Use XML and XSLT for data exchange and related operations;
Use XMLHttpRequest for asynchronous data query and retrieval;
Use JavaScript to tie everything together.
[Topic recommendation]:2020 ajax interview questions and answers (latest)
##2, Why use ajax:
2. What is the biggest feature of AJAX.
3. Please introduce the XMLhttprequest object.
4. What are the components of the AJAX technology system.
##HTML, css, dom, xml, xmlHttpRequest, javascript
In traditional Javascript programming, if you want to get information on the server-side database or file, or send client information to the server, you need to create an HTML form and then GET or POST data to the server. Users need to click the "Submit" button to send or receive data information, and then wait for the server to respond to the request and the page to reload.
Because the server returns a new page every time, traditional web applications may be slow and user-unfriendly.
Using AJAX technology, Javascript can interact directly with the server through the XMLHttpRequest object.
Through HTTP Request, a web page can send a request to the web server and accept the information returned by the web server (without reloading the page). The user is still shown the same page, and the user feels that the page is refreshed. , and you can't see the Javascript sending requests and receiving responses in the background.
There are a total of eight Callbacks for Ajax requests
onSuccess
onFailure
onLoading
onLoaded
onInteractive
onComplete
onException
Javascript is a scripting language that is executed on the browser side. Ajax is a development technology for creating interactive web applications. It uses a series of related technologies, including javascript.
Javascript is a scripting language developed by Netscape. It has nothing to do with Sun's Java language. Their similar names are just a marketing strategy.
In general web development, javascript is executed on the browser side. We can use javascript to control the behavior and content of the browser.
How information is passed between the browser and the server in an Ajax application
Through XML data or strings
The responseXMl attribute of the XMLHttpRequest object
Yes, it can be obtained through new ActiveXObject() in IE and through newXMLHttpRequest() in Firefox
10. Introduce the common methods and properties of the XMLHttpRequest object.
open("method","URL") establishes a call to the server. The first parameter is the HTTP request method, which can be GET, POST or anything supported by the server. The way you want to call it.
The second parameter is the URL of the requested page.
send() method, send a specific request
abort() method, stop the current request
readyState attribute request status is 5 Possible values 0=not initialized, 1=loading
2=to load, 3=interacting, 4=complete
responseText attribute The response of the server, represented as a string
reponseXML attribute server's response, expressed as XML
status HTTP status code of the server, 200 corresponds to ok and 400 corresponds to not found
12. What is XML
XML is an extended markup language that can describe data using a series of simple tags
##13. XML parsing methods
14. What framework (package) are you using?
This question is a must-ask, and is usually asked at the very beginning.15. If you are familiar with some kind of ajax framework , he may ask how to use this framework in the program
DWR framework introduction
16. Introduce what the $() function, $F() function, and $A() function of Prototype do.
$() method is A convenient shorthand for the all-too-frequently used document.getElementById() method in the DOM. Like this DOM method, this method returns the element with the id passed in as the parameter.17. Introduce the XMLHttpRequest object
Through the XMLHttpRequest object, Web developers can perform partial updates to the page after the page is loaded.18. What is the full name of AJAX? Introduce AJAX?
The full name of AJAX is Asynchronous JavaScript And XML.19. What technologies does Ajax mainly include?
Use JavaScript to bind everything together. In English, please see the original text by Jesse James Garrett, the proposer of Ajax, and the original title (Ajax: A New Approach to
AJAX applications use web browsers that support the above technologies as the running platform. These browsers currently include: Mozilla, Firefox, Internet Explorer, Opera, Konqueror and Safari. But Opera does not support XSL format objects, nor does it support XSLT.
20. What are the advantages and disadvantages of AJAX?
1. The biggest point is that the page does not refresh, and the user experience is very good.
2. Use asynchronous mode to communicate with the server, with faster response capability.
3. Some of the work previously burdened by the server can be transferred to the client, using the idle capacity of the client to process it, reducing the burden on the server and bandwidth, and saving space and broadband rental costs. And to reduce the burden on the server, the principle of ajax is to "fetch data on demand", which can minimize the burden on the server caused by redundant requests and responses.
4. Based on standardized and widely supported technology, there is no need to download plug-ins or small programs.
Disadvantages of ajax
1. Ajax does not support the browser back button.
2. Security issues AJAX exposes the details of interaction with the server.
3. The support for search engines is relatively weak.
4. Destroyed the exception mechanism of the program.
5. It is not easy to debug.
The above are 20 classic AJAX interview questions introduced by the editor (must know and master). I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will Reply to everyone promptly. I would also like to thank everyone for your support of the Script House website!
Recommended related articles: ajax video tutorial
The above is the detailed content of 20 classic AJAX interview questions (must know and know). For more information, please follow other related articles on the PHP Chinese website!

The differences in performance and efficiency between Python and JavaScript are mainly reflected in: 1) As an interpreted language, Python runs slowly but has high development efficiency and is suitable for rapid prototype development; 2) JavaScript is limited to single thread in the browser, but multi-threading and asynchronous I/O can be used to improve performance in Node.js, and both have advantages in actual projects.

JavaScript originated in 1995 and was created by Brandon Ike, and realized the language into C. 1.C language provides high performance and system-level programming capabilities for JavaScript. 2. JavaScript's memory management and performance optimization rely on C language. 3. The cross-platform feature of C language helps JavaScript run efficiently on different operating systems.

JavaScript runs in browsers and Node.js environments and relies on the JavaScript engine to parse and execute code. 1) Generate abstract syntax tree (AST) in the parsing stage; 2) convert AST into bytecode or machine code in the compilation stage; 3) execute the compiled code in the execution stage.

The future trends of Python and JavaScript include: 1. Python will consolidate its position in the fields of scientific computing and AI, 2. JavaScript will promote the development of web technology, 3. Cross-platform development will become a hot topic, and 4. Performance optimization will be the focus. Both will continue to expand application scenarios in their respective fields and make more breakthroughs in performance.

Both Python and JavaScript's choices in development environments are important. 1) Python's development environment includes PyCharm, JupyterNotebook and Anaconda, which are suitable for data science and rapid prototyping. 2) The development environment of JavaScript includes Node.js, VSCode and Webpack, which are suitable for front-end and back-end development. Choosing the right tools according to project needs can improve development efficiency and project success rate.

Yes, the engine core of JavaScript is written in C. 1) The C language provides efficient performance and underlying control, which is suitable for the development of JavaScript engine. 2) Taking the V8 engine as an example, its core is written in C, combining the efficiency and object-oriented characteristics of C. 3) The working principle of the JavaScript engine includes parsing, compiling and execution, and the C language plays a key role in these processes.

JavaScript is at the heart of modern websites because it enhances the interactivity and dynamicity of web pages. 1) It allows to change content without refreshing the page, 2) manipulate web pages through DOMAPI, 3) support complex interactive effects such as animation and drag-and-drop, 4) optimize performance and best practices to improve user experience.

C and JavaScript achieve interoperability through WebAssembly. 1) C code is compiled into WebAssembly module and introduced into JavaScript environment to enhance computing power. 2) In game development, C handles physics engines and graphics rendering, and JavaScript is responsible for game logic and user interface.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Zend Studio 13.0.1
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
