jQuery中location('')函数在Chrome中显示Uncaught ReferenceError: load is not defined错误

password_main 2014-06-06 10:35:36
在jsp界面中给dialog添加了一个Button按钮:
buttons: [
{
id: 'registerBtn',
//disabled: true,
text: '注册',
handler:function(){
location('register.jsp');
}
}
]
希望实现页面的跳转,到达register.jsp。

但结果在IE下可以实现,在Chrome无法实现跳转,显示:

Uncaught ReferenceError: load is not defined
$dialog.dialog.buttons.handler
...全文
1080 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
余先生i 2015-12-29
  • 打赏
  • 举报
回复
这是个什么错误啊
password_main 2014-06-06
  • 打赏
  • 举报
回复
引用 2 楼 Return_false 的回复:
跳转修改为 window.location='register.jsp';
可以了。 不过location(‘');跟 window.location=’‘;不是一样的吗?
  • 打赏
  • 举报
回复
跳转修改为 window.location='register.jsp';
password_main 2014-06-06
  • 打赏
  • 举报
回复
Chrome报错为: Uncaught TypeError: object is not a function login.js:34 $dialog.dialog.buttons.handler login.js:34指的是location('register.jsp');这一句。

87,901

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧