In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how DOM runs in AJAX. The quality of the article is high, so Xiaobian shares it with you as a reference. I hope you have a certain understanding of related knowledge after reading this article.
DOM was AJAX operation depressed for several days, today finally figured out, self-study is bitter ah, bitter a nose a tear,
The lesson out, to remind the latecomers, old birds do not see.
1. Do not confuse the XML operations in DOM with those in the browser. For example, getElementByName is a DOM operation built into the document object in the browser, which you use to operate.
ResponseXML is the wrong one. In the browser, you can use document.getElementsByName ('tagname ')[0].value to get the control value, but in the operation
For responseXML you must use getElementsByName ('tagname ')[0]. firstChild.data (same as nodeValue).
2. If you want to apply responseXML, you write response.setContentType("text/xml") in the server's response service;
If your AJAX code doesn't go through once, then even after you change it correctly, the page may still be wrong. This is caused by the pesky browser cache,
Damn cache. I've been stuck on this for at least a whole day.
So you'd better write a cache disallowed statement response.setHeader("Cache-Control","no-cache") on the server response page;
(The request url followed by the number of milliseconds of the current system is also a method.) Use new Date().getTime() in js to get the millisecond difference between the system and a specific time.).
3. Because some of the current IE standards are not fully compliant with W3C. For example:
We all know about onchange events, but IE does not support onchange attributes for text controls. Fortunately, we
onpropertychange event to listen for text.
For example, we can use setAtribute () to set CSS properties in browsers other than IE, but it is not supported in IE. Similarly, we use
EObj.style.stylearrtibute=value.
About AJAX DOM operation is how to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.