samedi 8 juillet 2017

javascript if statement error with or arguments

I have a script in my html and this if statement creates an error for some reason and yes currentlocation is set.

        var currentlocation = document.getElementById("location").value;
        if( currentlocation == "Canada" || currentlocation = "Gravelines" || currentlocation = "Strasbourg" ) {
            rtprice = Math.round(tprice*100)/100;
        }

Aucun commentaire:

Enregistrer un commentaire