Prototype.js等效于jQuery .after()
-
09-10-2019 - |
题
什么是原型。JS等于以下代码
jQuery('#txtId').after(divdata);
解决方案
http://www.prototypejs.org/api/element/insert
好吧,您使用插入插件查看上面的链接
$('selector').insert ({'after': 'Content'});
在您的情况下,看起来像这样
$('#txtId').insert ({'after':divdata});
其他提示
死这项工作?我认为在jQuery之后没有一个快捷方式。
$(selector).each(function(){
appendChild(document.createTextNode("Text or html to insert"));
});
不隶属于 StackOverflow