案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function changeSource()
5
{
6
document.getElementById("frame1").src="/example/hdom/frame_c.html"
7
document.getElementById("frame2").src="/example/hdom/frame_d.html"
8
}
9
</script>
10
</head>
11
12
<body>
13
<iframe src="/example/hdom/frame_a.html" id="frame1"></iframe>
14
<iframe src="/example/hdom/frame_b.html" id="frame2"></iframe>
15
<br /><br />
16
<input type="button" onclick="changeSource()" value="改变两个框架的 source">
17
18
</body>
19
</html>
20