当前位置: 动力学知识库 > 问答 > 编程问答 >

jquery - how to edit link buttons in Bootbox / Bootstrap confirm window

问题描述:

I have a simple bootbox / javascript confirm window at:

https://www.guard-gate.com/test2/index.html

How do i edit the links for Sucess to point to google.com?

I was advised the following:

window.location.href = "http://www.google.com";

But would i have to add it to the code as follows?

 buttons: {

success: {

label: "Success!",

className: "btn-success",

callback: function(window.location.href = "http://www.google.com";) {

Example.show("great success");

网友答案:

Your code would be

buttons: {
    success: {
      label: "Success!",
      className: "btn-success",
      callback: function() {
         window.location.href = "http://www.google.com";
      }
   };
分享给朋友:
您可能感兴趣的文章:
随机阅读: