<html>
<head>
<title>js控制iframe的src属性 - www.jb200.com</title>
</head>
<body>
<iframe width="400" height="300" src="" name="iframename" id="iframeid"></iframe>
<br>
<script language="
javascript">
function u1(u)
{
document.getElementById("iframeid").src=u;
}
</script>
<input type="button" value="http://www.baidu.com/" onclick="u1('http://www.baidu.com/')">
<input type="button" value="http://www.google.com/" onclick="u1('http://www.google.com/')">
<input type="button" value="http://www.jb200.com/" onclick="u1('http://www.jb200.com/')">
</body>
</html>