に変なふうに振る舞う:HTMLボタンは、だから私は、このHTMLコードを持っていると言うクリック
function sendMain() {
swal({
title: "Preparando para mandar Email...",
text: "Clique em 'OK' para mandar o Email.",
type: "info",
showCancelButton: true,
closeOnConfirm: false,
showLoaderOnConfirm: true,
}, function() {
setTimeout(function() {
swal("Redirecionando!");
}, 2000);
});
}
<button id="send" onclick="sendMain()">Mandar</button>
。 事は:それをクリックすると、1/4秒間メッセージが表示され、次にページの上部に行き、「?」を追加します。ページのURLの末尾に移動します。なにが問題ですか?
sendMain関数の最後に 'return false 'を追加してみてください。 –
多分ライブラリミックスのバグ?あなたはライブラリを分離しようとしましたか? –
ありがとう、@ SergeSeredenko。それは今より良く機能しますが、それでもページの上部に移動します。 –