submit问题,为啥不起作用
.net后台是这么写的:
Response.Write(@ " <script language= 'javascript '> ");
Response.Write(@ "function goto(){ ");
Response.Write(@ "document.login.method= 'POST '; ")
Response.Write(@ "document.login.submit(); ");
Response.Write(@ "} ");
Response.Write(@ " </script> ");
前台页面:
<body onload= "goto(); ">
正常情况应该是,一打开该页面login表单就被submit到另一个action指定的网址,但是大部分用户正常,有个别用户打开此页面后无反映,现已排除程序错误,不知是什么阻止了自动submit动作?
------解决方案--------------------用Page.RegsiterScript省略.....将JS注册到页面里面.
------解决方案--------------------^_^,少用resopone.wirte()输出脚本就好了,输出字符串最好用