jQuery MiniUI
标题:
请问为什么document.getElementById("mainframe");取不到值,谢谢!
[打印本页]
作者:
alwinzhang
时间:
2014-5-8 10:33:46
标题:
请问为什么document.getElementById("mainframe");取不到值,谢谢!
请问为什么document.getElementById("mainframe");取不到值,谢谢!
<script type="text/javascript">
mini.parse();
var iframe = document.getElementById("mainframe");
iframe.src = "datagrid.html";
function onItemSelect(e) {
var item = e.item;
iframe.src = item.url;
}
</script>
<div id="layout1" class="mini-layout" style="width:100%;height:100%;">
<div class="header" region="north" height="70" showSplit="false" showHeader="false">
<h1 style="margin:0;padding:15px;cursor:default;font-family:'Trebuchet MS',Arial,sans-serif;">顶部标题栏</h1>
</div>
<div title="south" region="south" showSplit="false" showHeader="false" height="30" >
<div style="line-height:28px;text-align:center;cursor:default"></div>
</div>
<div showHeader="false" region="west" width="180" maxWidth="250" minWidth="100" >
<!--OutlookMenu-->
<div id="leftTree" class="mini-outlookmenu" url="outlookmenu2.txt"
idField="id" parentField="pid" textField="text" borderStyle="border:0">
</div>
</div>
<div title="center" region="center" bodyStyle="overflow:hidden;">
<iframe id="mainframe" frameborder="0" name="main" style="width:100%;height:100%;" border="0"></iframe>
</div>
</div>
作者:
felt
时间:
2014-5-8 10:54:17
注意代码顺序,html是从上到下执行的
要么把js放到下面去,要么包一层$(document).ready()
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2