我有一个简单的bootbox / javascript确认窗口:
https://www.guard-gate.com/test2/index.html
如何编辑Sucess指向google.com的链接?
我被告知以下内容:
window.location.href = "http://www.google.com";
但是我必须将其添加到代码中,如下所示吗?
buttons: {
success: {
label: "Success!",
className: "btn-success",
callback: function(window.location.href = "http://www.google.com";) {
Example.show("great success");
答案 0 :(得分:1)
您的代码将是
buttons: {
success: {
label: "Success!",
className: "btn-success",
callback: function() {
window.location.href = "http://www.google.com";
}
};