<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body>
<iframe src="test2.php" name="test2" id="test2"></iframe>
</body>
</html>下面test2的内容<html>
<script type="text/javascript">var evt=frames['test2'].contentWindow.event;//问题 我要怎么获取iframe下的event
alert(evt.clientY)</script>
<body>
<div style="width:300px;height:300px;border:solid 1px #ff0000;" onclick="dodo()">sdf</div>
</body>
</html>
我怎么都弄不出来 急 先谢谢
<head>
<body>
<iframe src="test2.php" name="test2" id="test2"></iframe>
</body>
</html>下面test2的内容<html>
<script type="text/javascript">var evt=frames['test2'].contentWindow.event;//问题 我要怎么获取iframe下的event
alert(evt.clientY)</script>
<body>
<div style="width:300px;height:300px;border:solid 1px #ff0000;" onclick="dodo()">sdf</div>
</body>
</html>
我怎么都弄不出来 急 先谢谢
window.parent.document.getElementById('test2').contentWindow.event;
不知道大家用什么方法 继续求答案
获取iframe中鼠标事件在父页的坐标位置