Today, let's talk about the role of Dom in ajax technology. When you use ajax to send a request to the server and return the data to the client, how do you display the returned data to the webpage? You can use Dom to add the content you want to display to html by using various Dom commands. For example, getElementById or getElementsByTagName.
InnerHTML display content? Or does appendChild add an element? Of course, it is also possible to create a non-existent createElement. if you want to create a cool ajax effect. you should not be unfamiliar with these commands. otherwise, you should study Dom knowledge! Even tables on your webpage can be managed using Dom. dom provides a set of commands for table elements. insertRow adds a row to the table, insertCell adds a column to the table, and so on ....... including your drop-down list, you can use the options object for operations. dom is everywhere in html pages, at least I think so. there is no combination of Dom. ajax won't be so dazzling. in the age of paying so much attention to user experience, mastering Dom should be a required skill for every front-end developer. go to the ajax section on this site and check out my "ajax original series tutorials". You will understand why Dom is so important. in addition, almost all Dom commands are found in the Dom manual of the Web circle. happy learning! Dom is still improving. We will wait and see!
Author: Kang Dong from: Www. Web666.Net