为了账号安全,请及时绑定邮箱和手机立即绑定

window.returnValue问题

window.returnValue问题

牧羊人nacy 2018-12-10 18:09:13
sel_date.aspx :     <script language="javascript">        function GetDate()        {            var reVal=window.showModalDialog("day.aspx", '',                "status:no;center:yes;scroll:no;resizable:no;help:no;dialogWidth:340px;dialogHeight:250px");            if(reVal!="")            {            document.formAct.txt_receive_date.value=reVal;  //返回所选的日期            };        };    </script>------------------------------------------------day.aspx    protected void Calendar1_SelectionChanged(object sender, EventArgs e)    {        string sel_date = Calendar1.SelectedDate.ToShortDateString();        Response.Write("<script>window.returnValue=" + sel_date + ";</script>");        Response.Write("<script>window.close();</script>");    } 问题是返回的时候:总是出现选择2008-09-01确是1998等错误的信息
查看完整描述

2 回答

?
神不在的星期二

TA贡献1963条经验 获得超6个赞

你试着 alert(reVal) 看看结果是什么,怀疑返回的window.returnValue有问题

另外,IE7下面这个样子使用window.showModalDialog有问题,FF也不支持


查看完整回答
反对 回复 2018-12-14
  • 2 回答
  • 0 关注
  • 1039 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信