【问题标题】:how to change dom of one frame bye the event of another frame?如何在另一帧的事件中改变一帧的dom?
【发布时间】:2010-12-08 07:19:31
【问题描述】:

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

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

我该怎么做? 帮帮我..

【问题讨论】:

  • 在您的问题中包含代码 - 这样可以更轻松地给出答案

标签: javascript jquery html jsp jsp-tags


【解决方案1】:

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

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

【讨论】:

  • other_frame 是其他框架的id还是名字?
  • @MohdAdnan: other_frame 指的是框架名称。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-01-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-12-23
  • 2011-10-22
  • 1970-01-01
相关资源
最近更新 更多