ant*_*paw 5 html javascript string mootools
我正在寻找一种方法来创建元素形式字符串,例如这不起作用:
$('some').adopt('<span>test</span>');
Run Code Online (Sandbox Code Playgroud)
你必须使用,new Element但我有一个巨大的HTML字符串.我能做到这一点:
new Element('div', {html: hugeHtmlString});
Run Code Online (Sandbox Code Playgroud)
但它错了.为什么它不能像jquery那样简单