bugsnail
0.07D
V2EX  ›  问与答

sweetalert 这个插件, 成功之后按 esc 退出后怎么刷新当前页面?

  •  
  •   bugsnail · Dec 23, 2016 · 1240 views
    This topic created in 3454 days ago, the information mentioned may be changed or developed.
    bugsnail
        1
    bugsnail  
    OP
       Dec 23, 2016
    仔细再刷了一遍官方文档, 找到答案了:

    ``` javascript
    swal({
    title: data.msg,
    type: "success",
    confirmButtonText: "确定",
    closeOnConfirm: true
    }, function (isConfirm) {
    if(isConfirm){
    location.reload(true);
    }else{
    location.reload(true);
    }
    });
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5955 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 03:29 · PVG 11:29 · LAX 20:29 · JFK 23:29
    ♥ Do have faith in what you're doing.