把你上面的代码排成下面这样,原来太乱
<script language='javascript'>
function dianji()
{
window.close();
window.opener.Form1._ctl0:_ctl7:shenhery.value=document.Form1.TextBox_MC.value;
window.opener.Form1._ctl0:_ctl7:shenherydm.value=document.Form1.TextBox_DM.value;
}
</script>这个窗口关闭的太早了吧.把它放到下面来.再改如下看看
<script language='javascript'>
function dianji()
{
window.opener.document.all('_ctl0:_ctl7:shenhery').value=document.all('TextBox_MC').value;
window.opener.document.all('_ctl0:_ctl7:shenherydm').value=document.all('TextBox_DM').value;
window.close();
}
</script>
<script language='javascript'>
function dianji()
{
window.close();
window.opener.Form1._ctl0:_ctl7:shenhery.value=document.Form1.TextBox_MC.value;
window.opener.Form1._ctl0:_ctl7:shenherydm.value=document.Form1.TextBox_DM.value;
}
</script>这个窗口关闭的太早了吧.把它放到下面来.再改如下看看
<script language='javascript'>
function dianji()
{
window.opener.document.all('_ctl0:_ctl7:shenhery').value=document.all('TextBox_MC').value;
window.opener.document.all('_ctl0:_ctl7:shenherydm').value=document.all('TextBox_DM').value;
window.close();
}
</script>
但针对这个Html控件在Asp.net中点击也会提交页面,执行Page_load(),如何才能避免它的提交?
全国IT公司速查手册,看看吧,提供各公司评论和排名,有点意思.:)
http://www.seeitco.com
欢迎大家进行评论,我们要让差的工司,爆露出来.