两个页面值的传递 window.opener.myform.username.value=this.value;试试看 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //parent.html<form><input type=text id=txt name=txt ondblclick='showChild();'><script>function showChild(){ window.open("child.html","","");}</script></form>//child.html<form><input type=text id=txt name=txt ondblclick='closeChild();'><script>function closeChild(){ var parent=window.opener; if (parent==null) return; parent.document.getElementById("txt").value=document.getElementById("txt").value; parent=null; window.close(); return true;}</script></form> 可以用一个全局变量操作或者在主页面中加一个 subpublic sub setval(str)me.text1.text=strEnd sub 可以用一个全局变量操作或者在主页面中加一个 subpublic sub setval(str)me.text1.text=strEnd sub 没问题,动态的多个可以的,从数据库中取出来的多个对吧,然后点击另一个page就可以得到点击的value。参考我的页面1--page1.jsp<form name=form1 action="" method="post"><input type="text" name="t1"><input type="button" onClick="javascript:window.open('page2.jsp');"></form>页面2--page2.jsp<form name=form2 action="" method="post"><%int i=0;while(i<5){i++;%><input type="text" name="<%=i%>"> <input type="button" onClick="insert(<%=i%>)"><%}%></form><script>function insert(m){window.opener.document.form1.t1.value = (document.getElementsByName(m)[0].value)}</script> 这个也只能把数据传递到父页面t1的文本框中。如果是有t5呢。如果我的光标停留在第三个文本框,我就让值传给它。并不是传给固定的那一个文本框t1,这个form1.(textname).value要有我的光标决定 javascript获取服务器IP js 方法调用 这个函数里window.location是什么意思? 一个关于网页标准和js的问题 提个小问题! 请教如何输出一个带两位小数的百分数0.00% extjs4中的flex属性是什么意思呢,有图请进 这个函数的返回值怎么得? 以身相许,跪求代码,怎么移动变换table的位置呢? css使用淡出效果将整个页面淡出后 后一个页面无法显示 面试题,近来练练哦 怎样让Marquee走完一遍就停
<form>
<input type=text id=txt name=txt ondblclick='showChild();'>
<script>
function showChild()
{
window.open("child.html","","");
}
</script>
</form>//child.html
<form>
<input type=text id=txt name=txt ondblclick='closeChild();'>
<script>
function closeChild()
{
var parent=window.opener;
if (parent==null) return;
parent.document.getElementById("txt").value=document.getElementById("txt").value;
parent=null;
window.close();
return true;
}
</script>
</form>
或者在主页面中加一个 sub
public sub setval(str)
me.text1.text=str
End sub
或者在主页面中加一个 sub
public sub setval(str)
me.text1.text=str
End sub
没问题,动态的多个可以的,从数据库中取出来的多个对吧,然后点击另一个page就可以得到点击的value。参考我的
页面1--page1.jsp
<form name=form1 action="" method="post">
<input type="text" name="t1">
<input type="button" onClick="javascript:window.open('page2.jsp');">
</form>
页面2--page2.jsp
<form name=form2 action="" method="post">
<%
int i=0;
while(i<5)
{
i++;
%>
<input type="text" name="<%=i%>">
<input type="button" onClick="insert(<%=i%>)">
<%
}
%>
</form>
<script>
function insert(m)
{
window.opener.document.form1.t1.value = (document.getElementsByName(m)[0].value)}
</script>