当我显示成功消息onsubmit
功能:
这是我的 Javascript :
<script>
popUpForm = function() {
jQuery('#successMessage').text("Successfully submitted !").fadeIn("slow")
jQuery('#successMessage').css("display", "block")
setTimeout(function() {
jQuery('#successMessage').fadeOut()
jQuery('#successMessage').css("display", "none")
}, 5000);
}
</script> And Here is my message block div: <div th:id = "successMessage" class="alert-box success"></div>
答案 0 :(得分:3)
请参阅使用以下代码我不确定。
var auto_info = setInterval(function() {
$("#successMessage").text("Successfully submitted !").fadeIn("successMessage");
$("#successMessage").trigger('updatelayout');
setTimeout(function() {
jQuery('#successMessage').fadeOut();
}, 5000);
});
答案 1 :(得分:2)