Foreword: The leadership asks me to realize the self-adaptation, the front-end frame construction also did not have me, at the beginning project also did not consider this, because the mister said a sentence, the leadership requests realizes, alas ...
Adaptive can be implemented by flushing: Bind the Window.onresize function, calculate the height and width of a module to be refreshed, and then flush the IFRAME.
Several ways to refresh the IFRAME (online search):
Scenario One: Use the Name property of the IFRAME to locate
<input type= "button" name= "button" value= "button" onclick= "Document.frames (' Ifrmname '). Location.reload ()" >
Or
<input type= "button" name= "button" value= "button" onclick= "Document.all.ifrmname.document.location.reload ()" >
Scenario two: Locating with an IFRAME id attribute
<input type= "button" name= "button" value= "button" onclick= "Ifrmid.window.location.reload ()" >
Scenario three: When the iframe src is a different Web site address (cross-domain operation)
<input type= "button" name= "button" value= "button" onclick= "window.open (document.all.ifrmname.src, ' ifrmname ', ') ">
Scenario Four: Partial refresh via and replacement of SRC for IFRAME
You can use document.getElementById ("Iframname"). src= "" to redirect the IFrame;
Of the first three, I didn't work, and the fourth one worked.
An IFRAME has the advantage of self-adapting: The overall refresh is adaptive and there are no strange problems.
Cons: Slower than setting CSS.
Summary: The refresh Adaptive method applies to the IFrame with tables and graphs, because these adaptations usually have to redraw the table icon, and the refresh will do the work in passing.
Self-adapting with refresh