如何通过另一帧的事件改变一帧的dom?

发布于 2024-10-06 06:25:58 字数 164 浏览 0 评论 0原文

我有一页,我已经写了代码

我正在使用jquery。现在我想在 FormView.jsp 的某些 div 中附加一些 html 元素,以响应 showFormPage.jsp 中触发的某些事件。

我该怎么做? 帮我..

i have one page and i have written code

i am using jquery. now i want to append some html elements in some div of FormView.jsp, in response to some of the event fired in showFormPage.jsp.

how can i do it?
help me..

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

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

发布评论

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

评论(1

瀞厅☆埖开 2024-10-13 06:25:58

在事件处理程序中,您可以在另一个名为 other_frame 的框架中定位 section 的元素 ID,如下所示:

$("#button").click(function() { 
  $("#section", top.frames["other_frame"].document).append("<b>your html elements</b>");
});

In your event handler you can target a element ID of say section in another frame called say other_frame, like so:

$("#button").click(function() { 
  $("#section", top.frames["other_frame"].document).append("<b>your html elements</b>");
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文