<iframe id="frame" name="frame" style="z-index: 1; border: 0; width: 100%; height: 100%">
<object id="ReportViewer" codebase="http://www.mysite.com/webreport/griectl.cab#Version=5,0,0,0"
height="100%" width="100%" classid="CLSID:E060AFE6-5EFF-4830-B7F0-093ECC08EF37">
<param name="ReportURL" value="Model\Client.grf" />
<param name="DataURL" value="Test.aspx?function_id=106000" />
<param name="AutoRun" value="true" />
</object>
</iframe>
js代码中怎么取到这个object?求解答。
解决方案 »
- 兼容问题 ie9,ff可用,但在低版本的ie中无效,高手快看过来丫
- 怎么确保接收post的返回值???
- 原型里定义属性方法
- jsp 中在父页面打开的showModalDialog 点击关闭后自己又打开一次怎么回事啊
- 迎新改变网站样式~~~急~~
- 网页A打开网页B,在网页B执行过程,执行完毕向网页A传值,怎么传?
- 正则表达式问题,高手们进来瞧瞧!
- 高手请解决!!!
- 请问如何让回车键代替Tab键在控件之间切换?
- 请问window.open和window.location是否可以实现相同的功能?
- 怎么禁用sencha中scroller的反弹
- 电脑中运行applet小程序,已正确安装JRE,但仍提示需重复安装JRE,该如何用JS检测电脑中是否已安装JRE了呢?
像设置z-index这些办法都没用,把object放到单独页面再被iframe引用也不行的,所以才会有这个问题
换种方法吧
额,那还有什么办法可以让div显示在object对象上面呢?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
var objID = $($('#frame').html().replace(/</ig, '<').replace(/>/ig, '>')).attr('id');
alert(objID); //显示ReportViewer
});
</script></head>
<body>
<iframe id="frame" name="frame" style="z-index: 1; border: 0; width: 100%; height: 100%">
<object id="ReportViewer" codebase="http://www.mysite.com/webreport/griectl.cab#Version=5,0,0,0"
height="100%" width="100%" classid="CLSID:E060AFE6-5EFF-4830-B7F0-093ECC08EF37">
<param name="ReportURL" value="Model\Client.grf" />
<param name="DataURL" value="Test.aspx?function_id=106000" />
<param name="AutoRun" value="true" />
</object>
</iframe>
</body>
</html>
这个只是又动态生成了一个object,不是原来iframe里面那个
var obj = document.getElementById('frame').contentWindow.document.getElementById("ReportViewer");
alert(obj);try 一下