diff options
author | adam <adam@> | 2021-01-29 13:38:21 +0200 |
---|---|---|
committer | adam <adam@> | 2021-01-29 13:38:21 +0200 |
commit | d14f3109973c7d95a15174db1a1346887765988d (patch) | |
tree | 02881b1a1771f8fb245d7381b6b9fb13b058492b /js | |
parent | 472e170f408e3d8d1db2eb066d445153aad55d73 (diff) | |
download | fileup-d14f3109973c7d95a15174db1a1346887765988d.tar.gz |
var -> let
Diffstat (limited to 'js')
-rw-r--r-- | js/validate_hero.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/js/validate_hero.js b/js/validate_hero.js index 6d29a53..ecd5195 100644 --- a/js/validate_hero.js +++ b/js/validate_hero.js @@ -1,8 +1,8 @@ function clear_hero_errors() { - var errors = document.getElementsByClassName("hero_form_error"); - var i; + let errors = document.getElementsByClassName("hero_form_error"); + let i; for (i = 0; i < errors.length; i++) { errors[i].hidden = true; @@ -10,8 +10,8 @@ function clear_hero_errors() } function validate_hero_login_form() { - var username=document.forms["hero_form"]["username"].value; - var flag=true; + let username=document.forms["hero_form"]["username"].value; + let flag=true; clear_hero_errors(); if(username.length==0) @@ -24,12 +24,12 @@ function validate_hero_login_form() } function validate_hero_form() { - var username=document.forms["hero_form"]["username"].value; - var email=document.forms["hero_form"]["email"].value; - var password=document.forms["hero_form"]["password"].value; - var password2=document.forms["hero_form"]["password2"].value; + let username=document.forms["hero_form"]["username"].value; + let email=document.forms["hero_form"]["email"].value; + let password=document.forms["hero_form"]["password"].value; + let password2=document.forms["hero_form"]["password2"].value; - var flag=true; + let flag=true; clear_hero_errors(); if(username.length==0) |