$(window.frames["DyncMenuPlugInFrame"].document).find("a").css("color","red");
window.document.getElementById("DyncMenuPlugInFrame").contentWindow.document.getElementById("scuser").value
父页面:
<HTML><HEAD>
<TITLE>Select Scope</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../../css/xpc.css" rel=stylesheet>
<script type="text/javascript" src="<%=home%>/js/lib/jquery.js"></script>
<script language="javascript"
src="<%=home%>/js/UserMangeJS<%=I18NUtil.getLocaleStringFromRequest(request)%>.js"></script>
<script type="text/javascript">
$(function(){
var iframeTag = document.getElementById('DyncMenuPlugInFrame');
var iframeSrc = "<%=real_SC_URL%>";
iframeTag.src=iframeSrc+"#isFromCA=true"+"#<%=userName%>"+"#<%=password%>"+"#<%=companyName%>"+"#<%=roleName%>";
iframeTag.style.display = 'block';
$("#DyncMenuPlugInFrame").load(function(){
alert("123");
alert(window.document.getElementById("DyncMenuPlugInFrame").contentWindow.document.getElementById("scuser").value);
//$(window.frames["DyncMenuPlugInFrame"].document).find("a").css("color","red");
//alert(document.frames("DyncMenuPlugInFrame").document.getElementsById("scuser").value);
})
})
</script>
</head>
<body>
<iframe width="100%" scrolling="auto" height="100%" frameborder="0" name="DyncMenuPlugInFrame" src="" id="DyncMenuPlugInFrame"></iframe>
</body>
</html>
子页面:
<input type="hidden" id="scuser" value="<%=user%>">