【发布时间】:2012-12-24 10:00:01
【问题描述】:
我们如何在框架中获取选定的单元格值?我通过单击链接调用 iframe。在 Iframe 中,我想获取所选单元格的属性值。
<script>
function main(container) {
if (!mxClient.isBrowserSupported()) {
mxUtils.error('Browser is not supported!', 200, false);
}
else {
var graph = new mxGraph(container);
var cell = graph.getSelectionCell();
}
</script>
<body onload="main(window.parent.document.getElementById('graphContainer'))">
<form id="form1" runat="server">
</form>
</body>
【问题讨论】:
-
iFrame 是否在同一个域中?你能告诉我们你的 HTML 设置吗?也许是 jsfiddle.net 的例子?
-
是的,Iframe 在同一个域中。
标签: javascript html iframe mxgraph jgraph