Response ument. getElementById (reobj). innerHTMLhttp_request.responseText; now how to get the specified responseText in responseT XMLHttpRequest
Instead of the entire HTML content.
Http_request = new XMLHttpRequest;
....
Document. getElementById (reobj). innerHTML = http_request.responseText;
Now responseText returns the entire HTML. how can I have it return the content in my specified tag?
Note: The framework is useless for any template, but an xmlajax. js file is loaded in index. php. In xmlajax. js, the above code obtains the entire HTML code of index. php. How to get the content of the specified tag instead of the entire HTML code !!!
------ Solution --------------------
Didn't you bother yourself?
Document. getElementById (reobj). innerHTML = http_request.responseText;
Document. getElementById (reobj). innerHTML = document. getElementById (reobj). getElementById ('_ ajax'). innerHTML
------ Solution --------------------
In this case, why don't you use responseXML? Let index. php generate an xml file, and then use the javascrip DOM to read the content of the desired node!
------ Solution --------------------
Index. php
Is the requested file controllable? You can control the returned content.