[javascript] margin-bottom:15px;<br/>padding-top:0px; <br/>padding-right:0px; <br/>padding-bottom:0px;<br/>padding-left:20px;<br/>font-family:monospace;<br/>word-wrap:break-word;<br/>overflow-x:auto;<br/>border-left-width :5px; :solid;<br/>左邊框顏色:rgb(221,221,221);<br/>字體大小:12px;<br/>行高:21px;<br/>顏色:rgb(102,102,102);<br/>背景顏色:rnameb">2455 style="color:rgb(0,51,102)"><strong>var</strong></span> adjustmentIframe <span style="color:rgb(51,153,51)">=</span>; <span style ="color:rgb(0,51,102)"><strong>函數</strong></span> <span style="color:rgb(0,153,0)">(</span>id<span style=" color:rgb(0,153,0)">)</span> <span style="color:rgb(0,153,0)">{</span> <br/> <span style="color:rgb(0,51,102)" ><strong>var</strong></span> iframe <span style="color:rgb(51,153,51)">=</span>; document.<span style="color:rgb(102,0,102) ">getElementById</span><span style="color:rgb(0,153,0)">(</span>id<span樣式=「顏色:rgb(0,153,0)」>)</span> <br/> span style="color:rgb(0,51,102)"><strong>var</strong></span> idoc <span style="color:rgb(51,153,51)">=</span>; iframe. <span style="color:rgb(102,0,102)">contentWindow</span> <span style="color:rgb(51,153,51)">&</span> iframe.<span style="color:rgb (102,0,102)">contentWindow</span>.<span style="color:rgb(102,0,102)">文檔</span> <span style="color:rgb(51,153,51)">|| </span> iframe.<span style="color:rgb(102,0,102)">contentDocument</span><span style="color:rgb(51,153,51)">;<br/></span> <br/> style="color:rgb(0,51,102)"><strong>var</strong></span>回呼<span style="color:rgb(51,153,51)">=</span>; <span style ="color:rgb(0,51,102)"><strong>函數</strong></span> <span style="color:rgb(0,153,0)">(</span><span style="color :rgb(0,153,0)">)</span> <span style="color:rgb(0,153,0)">{</span> <br/> <span style="color:rgb(0,51,102)"> <strong>var</strong></span> iheight <span style="color:rgb(51,153,51)">=</span>; Math.<span style="color:rgb(102,0,102)" >max</span><span style="color:rgb(0,153,0)">(</span>idoc.< ;span style="color:rgb(102,0,102)">body</span>。 <span style="color:rgb(102,0,102)">scrollHeight</span><span style="顏色:rgb(51,153,51)">,</span> idoc.<span style="color:rgb (102,0,102)">documentElement</span>.<span style="color: rgb(102,0,102)">scrollHeight</span><span style="color:rgb(0,153,0)">)< /span><span style="color:rgb(51,153,51) )">;<br/></span> <span style="color:rgb(0,102,0)"><em><br/>//取得其高< /em></span> <br/> iframe.<span style="color:rgb(102,0,102)">style</span>.<span style="color:rgb(102,0,102)">height</span> <span style="color:rgb(51,153,51)">=</span> iheight <span style="color:rgb(51,153,51)">+</span> <span style="color:rgb(51,102,204)">"px"</span><span style="color:rgb(51,153,51)">;<br/></span> <br/> <span style="color:rgb(0,153,0)">}</span> <br/> <span style="color:rgb(0,0,102)"><strong>if</strong></span> <span style="color:rgb(0,153,0)">(</span>iframe.<span style="color:rgb(102,0,102)">attachEvent</span><span style="color:rgb(0,153,0)">)</span> <span style="color:rgb(0,153,0)"><br/>{</span> <br/> iframe.<span style="color:rgb(102,0,102)">attachEvent</span><span style="color:rgb(0,153,0)">(</span><span style="color:rgb(51,102,204)">"onload"</span><span style="color:rgb(51,153,51)">,</span> callback<span style="color:rgb(0,153,0)">)</span><span style="color:rgb(51,153,51)">;<br/></span> <br/> <span style="color:rgb(0,153,0)">}</span> <span style="color:rgb(0,0,102)"><strong>else</strong></span> <span style="color:rgb(0,153,0)">{</span> <br/> iframe.<span style="color:rgb(0,0,102)">onload</span> <span style="color:rgb(51,153,51)">=</span> callback <br/> <span style="color:rgb(0,153,0)">}</span> <br/><span style="color:rgb(0,153,0)">}</span>
[javascript]
HTML代码如下所示:
padding-top:0px;
padding-bottom:0px;
line-height:25px;
color:0px;
line-height:25px;
color:使用程式碼:登入後複製
margin-bottom:15px;<br/>padding-top:0px;<br/>padding-right :0px;<br/>padding-底部:0px;<br/>padding-left:20px;<br/>word-wrap:break-word;<br/>overflow-x:auto; border-left-width:5px;<br/>border-left-style:solid; rgb(221,221,221)" name="code">