Home >Web Front-end >JS Tutorial >Description of the role of Dom in ajax technology_DOM
Today we will talk about the role of Dom in ajax technology. When you use ajax to make a request to the server and return data to the client. How do you display this returned data on the web page? There is no doubt that you are using Dom, using various instructions of Dom. To add the content you want to display to html. For example: getElementById or getElementsByTagName to find elements
innerHTML to display content? Or appendChild to add elements? Of course, creating a non-existent element is also possible. createElement can be easily implemented. If you want to create a cool and dazzling ajax effect. None of these instructions should be unfamiliar to you. Otherwise you should study Dom knowledge! Even the tables in your web page can be managed using Dom. Dom provides a set of instructions specifically for table elements. insertRow adds a row to the table, insertCell adds a column to the table, etc... Including your drop-down list, you can use the options object to operate. Dom is omnipotent in HTML web pages, at least I think so. Without Dom's unwavering cooperation. Ajax will not be so cool. In this era of so much emphasis on user experience, mastering Dom should be an essential skill for every front-end developer. Go to the ajax column of this site and take a look at the "ajax original series tutorial" I wrote, and you will understand why I talk about Dom being so important. And almost all Dom instructions will be found in the Dom manual of the Web circle. Happy studying! Dom is still making progress. We'll see!
Author: Kang Dong From: Www.Web666.Net