CreateDocumentFragment()

var ul = document.getelementsbytagname("ul")[0]; //asumiendo que existe var docfrag = document.createdocumentfragment(); var browserlist = ["internet explorer", "mozilla firefox", "safari", "chrome", "opera"]; browserlist.foreach (function(e){ var li = document.createelement("li"); li.textcontent=e; docfrag.appendchild(li); }); ul.appendchild(docfrag) //una lista con los navegadores mas conocidos
var docFragment = document.createDocumentFragment();

docFragment es una referencia a un objeto DocumentFragment vacio

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.