jQuery中以下原型的等效项是什么?
rowTag = 'li' , style = ('display', 'none') and html = <div class="nobr">..... </div> element = new Element(rowTag, style).insert(html);
您可以创建元素并分配属性,如下所示:
$('<tag/>', { id: 'foo', text: 'Go to Google!' });
然后您可以使用DOM插入方法之一
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
点击生成二维码
我来说两句