Create a DOM document from string, without JQuery

后端 未结 9 472
梦如初夏
梦如初夏 2020-12-05 14:12

We\'re looking for ways to create a DOM document in javascript from a string, but without using Jquery. Is there a way to do so? [I would assume so, since J

9条回答
  •  时光取名叫无心
    2020-12-05 14:21

    createDocumentFragment may help you.

    https://developer.mozilla.org/En/DOM/DocumentFragment

    Browsers always create document by themselves with empty page (about:blank). Maybe, in Chrome application there're some functions available (like XUL in FF), but there's no such function in ordinary javascript.

提交回复
热议问题