【发布时间】:2009-09-03 02:49:26
【问题描述】:
我有一个页面链接,该页面调用“性感警报框”脚本来弹出一条消息,询问用户是否同意条款和条件,并带有“我同意”和“取消”选项。
我已经完成了这么多,但现在我需要“我同意”选项才能将他们发送到新页面。 (“取消”返回用户当前页面。)
和document.location.href有什么关系?
我正在使用 mootools 框架。
Sexy Alert Box 1.2 mootools & jQuery
代码如下:
<a href="#"
onclick="Sexy.confirm('Do you agree to the terms and conditions?', {
textBoxBtnOk: 'I Agree', // goes to www.newpage.com
textBoxBtnCancel: 'Cancel' // return to current page
});">Link</a>
【问题讨论】:
-
那真的应该是
<a href="newpage.com" onclick="...">,这样非js用户就不会得到无效的链接。
标签: javascript mootools alerts