81,092
社区成员
发帖
与我相关
我的任务
分享
jQuery(":checked").each(function(q,i){
var codeid=jQuery(i).parent().parent().find("td").eq(1).html();
codeid=codeid.substring(0,codeid.length-1);
var codename=jQuery(i).parent().parent().find("td").eq(2).html();
codename=codename.substring(0,codename.length-1);
window.opener.jQuery("#tbb tr").find("input[name=codename][value='']").each(function(n,b){
jQuery(b).parent().parent().find("input").eq(1).val(codeid);
jQuery(b).parent().parent().find("input").eq(2).val(codename);
return false;
});
});
这是子窗体操作父窗体 子窗体值给父窗体<html>
<script type="text/javascript">
function GetDate(){
var a_text = document.getElementById("a_text");
window.open("pop.html");
}
</script>
<body>
<input type="text" id="a_text"/>
<input type="button" onclick="GetDate()" value="getDate"/>
</body>
</html>
<html>
<script type="text/javascript">
function setAValue(){
var openDoc = parent.opener.document;
openDoc.getElementById("a_text").value="结贴了!";
}
</script>
<body>
<input type="button" onclick="setAValue()" value="设值"/>
</body>
</html>
<html>
<script type="text/javascript">
function GetDate(){
var a_text = document.getElementById("a_text");
window.showModalDialog("pop.html", a_text, "status:no;center:yes;scroll:no;resizable:no;help:no;dialogWidth:300px;dialogHeight:310px");
}
</script>
<body>
<input type="text" id="a_text"/>
<input type="button" onclick="GetDate()" value="getDate"/>
</body>
</html>
<html>
<body>
<iframe src="sub_pop.html">
</iframe>
</body>
</html>
<html>
<script type="text/javascript">
function setAValue(){
parent.window.dialogArguments.value="好了,给分吧!";
}
</script>
<body>
<input type="button" onclick="setAValue()" value="设值"/>
</body>
</html>