prototype.js 相当于 jquery .after()

发布于 2024-10-06 09:02:47 字数 89 浏览 4 评论 0原文

相当于以下代码的prototype.js是什么

jQuery('#txtId').after(divdata);

What is the prototype.js equivalent of following code

jQuery('#txtId').after(divdata);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

仅此而已 2024-10-13 09:02:47

http://www.prototypejs.org/api/element/insert

那么你使用插入 在您的情况下查看上面的链接,

 $('selector').insert ({'after': 'Content'});

它看起来像这样

$('#txtId').insert ({'after':divdata});

http://www.prototypejs.org/api/element/insert

well you use insert look at the link above

 $('selector').insert ({'after': 'Content'});

in your case it would look like this

$('#txtId').insert ({'after':divdata});
白云悠悠 2024-10-13 09:02:47

正在寻找这个,

new Insertion.After('id of element', "HTML");

参考

Are looking for this,

new Insertion.After('id of element', "HTML");

Ref

妞丶爷亲个 2024-10-13 09:02:47

这作品死了吗?我不认为jquery中有像after这样的快捷方式。

$(selector).each(function(){
   appendChild(document.createTextNode("Text or html to insert"));
 });

Dies this work? I dont think there is a shortcut like after in jquery.

$(selector).each(function(){
   appendChild(document.createTextNode("Text or html to insert"));
 });
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文