|
蓝森林 http://www.lslnet.com 2006年8月25日 8:28
ifame控制idv移动的问题
我在一个网页里通过一个ifame来引用另一个网页
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>1</title>
<script language="JavaScript" type="text/JavaScript">
function FrameMove(){
var FrameName = frame1.document.getElementById("map");
var MapLeft = FrameName.style.left;
MapLeft = MapLeft +30;
}
</script>
</head>
<body leftmargin="1" topmargin="1">
<div id="control" style="position:absolute; left:2px; top:302px; width:100px; height:100px; z-index:1">
<form name="test">
<input type="button" value="-->" onclick="FrameMove()">
<input type="text" id="ceshi">
</form>
</div>
<iframe name= "frame1"src= "./3.htm" width= 300 height= 300 scrolling="no"></iframe>
</body>
</html>
另外一个网页是这样的
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<div id="map" style="position:absolute; overflow:hidden; left:1px; top:1px; width:400px; height:400px; z-index:1">
</div>
</body>
</html>
我想通过按"->"按扭让这个DIV移动,但是它不动,WHY? |
|