嗨我正在一個網站上,我有一個登錄頁面,錯誤憑據它顯示一個消息在div上,但我需要隱藏此消息後,我刷新相同的錯誤頁面。我是JQuery Javascipt的新手,無論如何需要實現此功能。如何隱藏頁面刷新時的錯誤消息?
<c:if test="${not empty error}">
<div class="alert alert-error text-center">
${error}
<button class="close" data-dismiss="alert"></button>
</div>
</c:if>
補充:
或有任何其他方式在刷新此頁面重定向到另一個頁面(登錄)。?
請幫助上面。
你使用任何Javascript框架? JQuery的? – LoreV
'window.onunload = unloadPage; function unloadPage() {('。alert-error')。hide(); }' –
是的,我正在使用jQuery。 –