How to get the current framework where the element node

// the HTML code below 
// <iframes the src = "about.html"> </ iframes> 

// following script about.html inside 
var frameEl = window.frameElement;
 IF (frameEl) { 
  frameEl.src = 'OTHER. HTML ' ; 
}

Note, window.frameElement here is only valid in the frame or iframe, if it is used directly in the window, null is returned 

Guess you like

Origin www.cnblogs.com/aisowe/p/11703013.html