+ -
当前位置:首页 → 问答吧 → window.location.href 不能够跳转

window.location.href 不能够跳转

时间:2011-11-08

来源:互联网

function Login()

  var URL = window.document.getElementById('<% =TextBox1.ClientID %>').value;
  window.location.href = URL;

其中 textbox1 中的值是:
“http://localhost:28578/Project/Login.aspx?form=http://localhost:28578/Project/Apps/App1.aspx”

该事件是由button控件的OnClientClick触发

作者: shuangchonggeng   发布时间: 2011-11-08

全角的问号?? 从你的描述没看出什么,是不是代码有哪里写错了?

作者: p2227   发布时间: 2011-11-08

不是问号的缘故,不知道是为什么

作者: shuangchonggeng   发布时间: 2011-11-08

1. firebug调试

2. 认真查看代码,比如; 大小写 空格 等

作者: p2227   发布时间: 2011-11-08

JScript code
var URL =document.getElementById('<% =TextBox1.ClientID %>').value;

作者: xiaofanku   发布时间: 2011-11-08