<br><div class="msgheader"> <div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode112'));"><u>複製程式碼</u></span></div>代碼如下:</div> <div class="msgborder" id="phpcode112"> <br><iframe src="1.htm" name=" ifrmname" id="ifrmid"></iframe> <br> </div> <br>方案一: <br>用iframe的name屬性定位<br><br><div class="msgheader"><div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode113'));"><u></u></span></div></div> <div class="msgborder" id="phpcode113"> <br><br><br> </div>複製程式碼<br><br><br>程式碼如下:<br><div class="msgheader"> <div class="right"> <input type="button" name="Button" value="Button" onclick="document.frames('ifrmname ').location.reload()">或<span style="CURSOR: pointer" onclick="copycode(getid('phpcode114'));"><input type="button" name="Button" value="Button" onclick="document.all.ifrmname.document.location.reload()"> <u></u></span>方案二: </div>用iframe的id屬性定位</div> <div class="msgborder" id="phpcode114"> <br><br> </div> <br>複製代碼<br><br><br>代碼如下:<div class="msgheader"> <div class="right"> <span style="CURSOR: pointer" onclick="copycode(getid('phpcode115'));"><input type="button" name="Button" value="Button" onclick="ifrmid.window.location.reload()"> <u></u></span>終極方案: </div>當iframe的src為其它網站地址(跨域操作時) </div> <div class="msgborder" id="phpcode115"> <br><br> </div>複製代碼程式碼如下: <input type="button" name="Button" value="Button" onclick="window.open(document.all.ifrmname.src,'ifrmname','' )">