localtion.href。。。登陆以后不转向
我在index.aspx里面包含一个login.aspx
login.cs代码如下~~~
if (TextBox1.Text == TextBox2.Text)
{
// Response.Redirect( "../user/index.htm ");
Response.Write( " <script> localtion.href= '../user/index.htm ' </script> ");
}
else
{
Response.Write( " <script> window.alert( '密码错误 '); </script> ");
Response.Write( " <script> localtion.href= ' " + "../user/index.htm " + " '; </script> ");
}
我发现用javascript脚本转向的时候。老是转不过去。。求高手帮忙
------解决方案--------------------Response.Write( " <script language= "javascript "> window.alert( '密码错误 ');localtion.href= '../user/index.htm '; </script> ");
------解决方案--------------------K,location寫錯了
你寫成localtion
------解决方案--------------------localtion
两处都写错了
------解决方案--------------------String str = @ " <script language= " "javascript " ">
alert( " "注册成功! " ");
window.location.href= " "EnterPriseList.aspx " ";
</ " + "script> ";
Response.Write(str);