Swal表现不当



每当我单击swal中的确定按钮时,后面的主网页就会变得无反应。

<button id="myBtn" onclick="myFunction()">Click me</button>
function myFunction(){
  swal({
  title: "About Murli!",
  text: "Select the Month or Year, or both and then click on the Search button to get the list.",
  icon: "info",
  button: {
    text: "OK",
    value: true,
    visible: true,
    className: "",
    closeModal: true,
    closeOnClickOutside: true,
    closeOnEsc: true,
  },
  timer: 3000,
});
}````
The alert box opens correctly but after clicking on OK, the main page becomes unresponsive.
swal({
  title: "About Murli!",
  text: "Select the Month or Year, or both and then click on the Search button to get the list.",
  icon: "info",
  button: {
    text: "OK",
    value: true,
    visible: true,
    className: "",
    closeModal: true,
    closeOnClickOutside: true,
    closeOnEsc: true,
  },
  timer: 3000,
}).done(function(){
    swal.close();
});

尝试上述代码。

最新更新