现在的位置: 首页 > 综合 > 正文

You should re-bind this JavaScript event on this element if the element be dynamically updated

2013年10月16日 ⁄ 综合 ⁄ 共 444字 ⁄ 字号 评论关闭

 

Description: the sub-frame is response for receiving data from background and renders them to HTML code. Then update the special HTML element in parent. Since the element has been updated totally, even though they are the same id and name, the events which bind on them before will not be effective. We have to bind these events again in sub-frame.

And you also invoke parent function do it in the sub-frame. Explicitly like this:

..getHtmlFromBackgound;

..renderHTML;

..updateParentHtmlElement;

window.parent.rebind();

 

抱歉!评论已关闭.