Best way to add DOM elements with jQuery

后端 未结 7 1068
南笙
南笙 2020-12-05 02:08

So I\'ve seen three ways to add html/DOM elements to a page. I\'m curious what the pros and cons are for each of them.

1 - Traditional JavaScript

7条回答
  •  没有蜡笔的小新
    2020-12-05 02:42

    Clone existing Content...

    var $html = $template.clone();
     $html.find(''); ///after change content...  

    Because of clone content is with 'DOM' properties. Then u can change this tags,properties,value then append it..

提交回复
热议问题