是可以改变的:
<iframe id="ccc" width="100" height="100"
src="ifr.htm" scrolling="0" frameborder="0">
</iframe>
<input type="button" value="按钮" name="B3" onclick="aaa()">
<script>
function aaa(){
ccc.frameBorder="1"
ccc.scrolling="1"
alert(ccc.frameBorder)
}
</script>因为你的iframe页没有东东,看不出效果,可以放一个试试
<iframe id="ccc" width="100" height="100"
src="ifr.htm" scrolling="0" frameborder="0">
</iframe>
<input type="button" value="按钮" name="B3" onclick="aaa()">
<script>
function aaa(){
ccc.frameBorder="1"
ccc.scrolling="1"
alert(ccc.frameBorder)
}
</script>因为你的iframe页没有东东,看不出效果,可以放一个试试
但我在Mozilla下面运行下面代码,frameBorder可以被动态改变,但scrolling还是不行。<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<iframe id="ccc" frameBorder="1" src="showmessage.html" width=40% height=40% scrolling="yes"></iframe>
<input type="button" value="按钮" name="B3" onclick="aaa()">
<script type="text/javascript">
function aaa()
{
document.getElementById("ccc").frameBorder="0";
document.getElementById("ccc").scrolling="no";
}
</script>
<p></p>
</body>
</html>