2010-01-04 55 views
1

我想更新另一個iframe。我有一個iframe中的鏈接,它應該更新其他iframe的內容。 checkresult.html中有鏈接,它應該更新statusmessage.html。我可以更新一個iframe嗎?

<table width="100%"> 
    <tr> 
    <td width="10%"> 
    <iframe id="test" src ="checkresult.html" height="1000px" width="100%" frameborder="1"> 
    </iframe > 
    </td> 
    <td align="left" width="80%"> 
    <iframe id="msgstatus" name = "test" src ="StatusMessage.html" align="left" width="100%" height="1000px" frameborder="1" > 

    </iframe></td> 
    </tr> 
    </table> 

回答

1

如果你想在一個框架中的鏈接另一個打開,你需要參考其他的在鏈接的target屬性name屬性。因此,在這種情況下,checkresult.html一個環節都需要有test目標在msgstatus框架中打開:

<a href="something.html" target="test">Link text</a> 
相關問題