是这样吗?
<script type="text/javascript" language="javascript">
function changeSrc(srcName)
{
document.getElementById("iframeId").src = srcName ;
}
</script>
<body>
<form id="formId">
<input type="button" name="baidu" value="百度" onClick="changeSrc('http://www.baidu.com')" />
<input type="button" name="google" value="谷歌" onClick="changeSrc('http://www.')" />
</form>
<iframe id="iframeId" src="http://www.baidu.com" height="400" width="98%">
</iframe>
</body>