父页面代码:
<div class="zdleft_box">
<iframe src="simple_cggl.html" width="100%" height="100%" frameborder="0" border="0" frameSpacing=0 marginwidth="0" marginheight="0" scrolling="no" id="cggl_iframe_simple"></iframe>
</div>
<input type="text" id="txt1"/>
子页面代码:
<div class="ui3_city_change tool_button box_chos" id="ui3_city_change" tool_content="#ui3_city" ><span class="ui3_city_change_wenzi">你好好</span></div>
</div>
父页面的js里的代码:
$("#cggl_iframe_simple").contents().find("div #ui3_city_change").hide();
在子页面获取父页面元素代码:
var val = parent.document.getElementById("txt1");