例如我想改变这个iframe的文件,高度和宽度等.
function iframes(){
content.location= 'http://www.zishu.cn/m.html';
document.getElementById('content').height= 500;
document.getElementById('content').width= 1000;
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>javascript test</title>
</head>
<body>
<form action="" method="get" >
<select οnchange="iframes(this.value)" οnkeypress="iframes()">
<option value="1"> 请选择 </option>
<option value="2"> 变 </option>
</select>
<iframe src="http://www.zishu.cn" name="content" height="200" width="468" scrolling="no" id="content" frameborder="0"></iframe>
<script>
function iframes(){
content.location= 'http://www.zishu.cn/m.html';
document.getElementById('content').height= 500;
document.getElementById('content').width= 1000;
}
</script>
</body>
</html>