急问,关于js中窗体之间值传递的问题 opener.document.getElementByName("Ma").value=M.value 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><script language="JavaScript">function popw(){ window.open('myDialog.htm','pop1','height=215,width=355,top=284,left=412,toolbar=no,menubar=no,scrollbar=no,resizable=no,location=no,status=no') } function getsum() { a=num_1.num1.value; b=num_2.num2.value; a=parseFloat(a); b=parseFloat(b); sum=a+b; document.sum_v.sumV.value=sum; }function shutwin(){window.close();return;} </script><script language="JavaScript" type="text/JavaScript"><!--function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);//--></script></head><body><table width="800" height="441" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="441"><table width="400" border="1" align="center" cellpadding="2" cellspacing="2"> <tr> <td width="50"> <div align="center">姓名</div></td> <td width="50"> <div align="center">数学</div></td> <td width="50"> <div align="center">历史</div></td> <td width="50"> <div align="center">外语</div></td> <td width="50"> <div align="center">总分</div></td> </tr> <tr> <td height="22" align="center">张胖胖</td> <td height="22"><input id="Ma" type="text" id="Ma" width="40"></td> <td height="22" align="center"><input width="45" type="text" id="Hi"></td> <td height="22" align="center"><input width="45" type="text" id="En"></td> <td height="22" align="center"><input width="45" type="text" id="Sz"></td> </tr> </table> <p> </p> <table width="400" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="400"> <div align="center"> <input type="button" name="Submit" value="修改成绩" onClick="popw()"> <input type="button" name="Submit2" value="关闭窗口" onClick="shutwin()"> </div> </td> </tr> </table> </td> </tr></table><p> </p></body></html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title></title> <script language="JavaScript"> function test(){ a=this.name; document.te1.te.value=a; } function shutwin(){window.close();return;}function doModify(){ var parDoc=window.opener.document.all; parDoc.Ma.value=form1.M.value; parDoc.Hi.value=form1.H.value; parDoc.En.value=form1.E.value; var sum=parseInt(form1.M.value==""?'0':form1.M.value,10)+parseInt(form1.H.value==""?'0':form1.H.value,10)+parseInt(form1.E.value==""?'0':form1.E.value,10); parDoc.Sz.value=sum;}</script></head><body leftmargin="0" topmargin="0"><table width="350" height="200" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC"> <tr> <td><form action="sum.html" name="form1" method="post" target="sum.html"> <table width="350" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center">数学: <input type="text" onFocus="this.select()" name="M"> </div></td> </tr> <tr> <td height="16"> <p align="center">历史: <input type="text" onFocus="this.select()" name="H"> </p></td> </tr> <tr> <td><div align="center">外语: <input type="text" onFocus="this.select()" name="E"> </div></td> </tr> <tr> <td height="40"> <div align="center"> </div> <div align="center"> <input type="button" name="btnModify" value="修改数据" onClick="doModify()"> <input type="button" name="Submit2" value="关闭窗口" onClick="shutwin()"> </div></td> </tr> </table> </form></td> </tr></table></body></html> 弹出层参数设置 利用js关闭ie7选项卡不提示 给解释一下段话是什么意思? document.write 小问题 主窗口加载的如何控制其下的iframe的src 在firefox中,怎样屏蔽掉鼠标中键? (梅雪香@深圳)的popup日歷控件不支持IE5.5嗎? windwo.open方法打开窗口时,关闭源窗口??? 如何在CE3.0中实现页面中嵌入另一页?(CE3不支持IFrame,document对象) layUI如何实现当前页面的刷新? 如何判断读到Excel文件的最后一行? 很简单却难了我半天,给点建议。
<head><script language="JavaScript">function popw(){
window.open('myDialog.htm','pop1','height=215,width=355,top=284,left=412,toolbar=no,menubar=no,scrollbar=no,resizable=no,location=no,status=no')
} function getsum() {
a=num_1.num1.value;
b=num_2.num2.value;
a=parseFloat(a);
b=parseFloat(b);
sum=a+b;
document.sum_v.sumV.value=sum;
}
function shutwin(){
window.close();
return;}
</script><script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<table width="800" height="441" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="441">
<table width="400" border="1" align="center" cellpadding="2" cellspacing="2">
<tr>
<td width="50"> <div align="center">姓名</div></td>
<td width="50"> <div align="center">数学</div></td>
<td width="50"> <div align="center">历史</div></td>
<td width="50"> <div align="center">外语</div></td>
<td width="50"> <div align="center">总分</div></td>
</tr>
<tr>
<td height="22" align="center">张胖胖</td>
<td height="22"><input id="Ma" type="text" id="Ma" width="40"></td>
<td height="22" align="center"><input width="45" type="text" id="Hi"></td>
<td height="22" align="center"><input width="45" type="text" id="En"></td>
<td height="22" align="center"><input width="45" type="text" id="Sz"></td>
</tr>
</table>
<p> </p>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="400">
<div align="center">
<input type="button" name="Submit" value="修改成绩" onClick="popw()">
<input type="button" name="Submit2" value="关闭窗口" onClick="shutwin()">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
</body>
</html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<script language="JavaScript">
function test(){
a=this.name;
document.te1.te.value=a;
}
function shutwin(){
window.close();
return;}
function doModify(){
var parDoc=window.opener.document.all;
parDoc.Ma.value=form1.M.value;
parDoc.Hi.value=form1.H.value;
parDoc.En.value=form1.E.value;
var sum=parseInt(form1.M.value==""?'0':form1.M.value,10)+parseInt(form1.H.value==""?'0':form1.H.value,10)+parseInt(form1.E.value==""?'0':form1.E.value,10);
parDoc.Sz.value=sum;
}
</script>
</head><body leftmargin="0" topmargin="0">
<table width="350" height="200" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td><form action="sum.html" name="form1" method="post" target="sum.html">
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">数学:
<input type="text" onFocus="this.select()" name="M">
</div></td>
</tr>
<tr>
<td height="16"> <p align="center">历史:
<input type="text" onFocus="this.select()" name="H">
</p></td>
</tr>
<tr>
<td><div align="center">外语:
<input type="text" onFocus="this.select()" name="E">
</div></td>
</tr>
<tr>
<td height="40"> <div align="center"> </div>
<div align="center">
<input type="button" name="btnModify" value="修改数据" onClick="doModify()">
<input type="button" name="Submit2" value="关闭窗口" onClick="shutwin()">
</div></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>