-1
嗨我有模型與反饋的形式。模型提交後應該顯示另一個感謝模型也需要存儲本地存儲。幫我。Javascript顯示謝謝你模式提交
<div id="myModal2" class="modal fade" role="dialog">
<form action="" method="post" onSubmit="popUpToggle();" id="myModal2" >
<div class="form_fields feedbackfield">
<textarea id="txtMessage" name="txtMessage" rows="5" class="form-control contact-input" placeholder="Message *" required></textarea>
</div>
<div class="form_fields">
<input type="submit" class="contact-submit" name="SUBMIT" value="SUBMIT">
</div>
</form>
</div>
<div id="myModal4" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="popupHead3">
Thank you for your feedback
</div>
</div>
的Javascript:
setTimeout(function() {
if(localStorage.getItem("modalPopup")){$("#myModal2").modal('hide');}
else{$('#myModal2').modal('show');}
}, 5000);
function popUpToggle(){
localStorage.setItem("modalPopup", "commit");
}
我該怎麼做..?我給popUpToggle()作爲onSubmit – user2172424