Full-stack JavaScript (8) Learning CDATASection type nodes

Source: Internet
Author: User

CDATASection nodes are only for XML-based documents and represent CDATA. The constructor function is: CDATASection function () {[native code]}.

The CDATASection type inherits from the Text type. Therefore, this type of node has all the methods except splitText () and method for the Text type node.

The CDATASection type has the following features:

CDATA only appears in XML. Therefore, all browsers, including mainstream browsers, resolve the CDATA region to Comment or Element.


In a real XML document, you can use document. createCDATASection () to create a CDATASction node. The parameters are the content you want to fill in.


In Firefox, Safari, Chrome, and Opera, you can access the CDATASection constructor and prototype. IE9 and earlier versions do not support this type.

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.