Javaweb solves the problem of writing the content returned by ajax with document. write, FireFox is always loaded, ajaxdocument. write

Source: Internet
Author: User

Javaweb solves the problem of writing the content returned by ajax with document. write, FireFox is always loaded, ajaxdocument. write

Add document. close after the document. write method to solve the problem,

If you want to know the principle, you can continue to read it.

The browser opens a stream when parsing html, which is written in document. write and is added
When the parsing is completed, that is, the DOM structure is determined, the stream is closed.
After this, using document. write will open a new stream and overwrite the previous content.

When using ajax, we usually open a new stream to overwrite the previous information. If you do not close the stream manually,
FireFox will think that the document has not been parsed, so it will continue

* If your Firef does not encounter this problem, it may be a version issue.
If the problem persists, contact me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.