<reponame>nataliasviattseva/Greta-Formation-Python-2023<filename>myDjangoProjet/static/jvs/script.js<gh_stars>0const COURRIEL = "envkt@example.com";

function checkSubmit(){
    inputText = document.forms["mailForm"].element["mailInput"].value;
        if(inputText == COURRIEL){
            document.getElementById("checkSpan").innerText = "OK";
//            document.getElementById("mailForm").submit();
        } else {
            document.getElementById("checkSpan").innerText = "! Courriel Incorrect !";
            document.getElementById("mailInput").value = "";
            document.getElementById("mailInput").focus();
        }
}

function getImgWidth(img){
    alert("image width : " + img.width);
}

function setDivWidth(){
    var imgWidth = document.getElementById("imgGreta78").width;
//    document.getElementById("divFormationDjango").style.width = imgWidth + "px"
}

function setSectionPosition(){
    var bodyHeight = document.body.clientHeight;
    document.getElementById("passSection").style.marginTop = (bodyHeight/4) + "px";
}
