Response.Write("<script language=javascript>window.returnValue='true';window.close()</script>");
这句中为什么returnValue="true"会报错啊?但是我用单引号表示,好像又不能正确赋值?谢谢asp.netreturnValueResponse

解决方案 »

  1.   


    去掉引号也不会报错我是像这样写的,a.aspx中,有Page.ClientScript.RegisterStartupScript(typeof(string), "js ", " <script>var ret= window.showModalDialog( 'SelectNum.aspx ', null, 'dialogWidth=300px;scrollbars=yes;dialogHeight=300px ');if(ret=='true') window.location='Menu.aspx' </script> ");
    弹出selectNum的aspx网页,然后再selectNum中点击一个button,他能返回returnValue,在a.aspx中被捕捉去掉引号他没有反应……
      

  2.   

    我试过,不要ret值的时候,跳转时没有问题的。就是说,在赋值的时候,或者在a.aspx中的ret值判断的时候除了问题。
    我看别人的js程序用的是“”。我只会用response.write,结果在()里面不能再用“”了。请问?