javascriptはiframeの内容を更新します.

933 ワード


<html>
<head>
	<title></title>
</head>
	<script language="JavaScript">
		function u1(u)
		{
		  document.getElementById("iframeid").src=u;
		}
	</script>
	<body>
		<iframe  width="400" height="300" src="" name="iframename" id="iframeid"></iframe>
		<br>
		<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.51js.com/" onClick="u1('http://www.51js.com/')">
	</body>
</html>