我有iframe與SRC像http://remote-domain.com/
,當有史以來src爲得到改變,我需要引起類似如何在iframe src更改時觸發某個函數?
<iframe id="iframe" src="http://remote-domain.com/" frameborder="0" width="100%" height="100%" ></iframe>
,當用戶點擊有關,我們內部的iframe的功能,在IFRAME SRC會改成
<iframe id="iframe" src="http://remote-domain.com/about-us.html" frameborder="0" width="100%" height="100%" ></iframe>
所以這次我需要觸發函數。
請幫我解決這個問題。
請參閱 http://stackoverflow.com/questions/2429045/iframe-src-change-event-detection –