読み込んだページのURL:
<script type="text/javascript">
function fIFrameSrc(url){
var obj=document.getElementById("iframe7");
obj.src=url;
document.getElementById("resIFrameSrc").value=obj.src;
}
</script>
<p>
<label for="s0"><input type="radio" id="s0" name="ss" value="/content/demo/sample.html" onclick="fIFrameSrc(this.value)" />ダミーページ</label>
<label for="s1"><input type="radio" id="s1" name="ss" value="http://www.yahoo.co.jp" onclick="fIFrameSrc(this.value)" />Yahoo! JAPAN</label>
<label for="s2"><input type="radio" id="s2" name="ss" value="http://www.google.co.jp" onclick="fIFrameSrc(this.value)" />Google</label>
</p>
<iframe
id="iframe7"
src="/content/demo/sample.html"
width="490" height="200"
scrolling="yes"
frameborder="1"
>
インラインフレーム対応のブラウザでご覧下さい。
</iframe>
<p>読み込んだページのURL:<input type="text" id="resIFrameSrc" size="45" readonly="readonly" /></p>