【问题标题】:colorbox href to sweetalertcolorbox href 到 sweetalert
【发布时间】:2018-03-14 17:36:58
【问题描述】:

我必须将颜色框弹出窗口更改为 sweetalert2 弹出窗口 我的问题是我在 colorbox 中使用 href 属性来获取 HTML 内容 我在 sweetalert2 中找不到相同的方法

有解决办法吗?

谢谢

【问题讨论】:

    标签: html colorbox sweetalert2


    【解决方案1】:

    您可以使用 jquery 的.get() Method 来获取 html 数据。您需要做的是引用 html 文件。

    您的 javascript 代码应如下所示。

      $.get("yourFile.html", function (data) {
         swal({
           html: data
         });
      });
    

    祝你好运!

    【讨论】:

      猜你喜欢
      • 2012-06-14
      • 2011-07-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多