Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var submit = window.document.getElementById ('submit');
- submit.onclick = function () {
- window.localStorage.submit = 'wait';
- wait ();
- };
- function wait () {
- if (window.localStorage.submit == 'wait') {
- var time = 15;
- var timer = window.setInterval ( function () {
- submit.value = time--;
- if (!time) {
- submit.value = 'Отправить';
- window.localStorage.submit = 'go';
- window.clearInterval (timer);
- }
- }, 1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement