Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function resetForm() {
- document.getElementById("form1").reset();
- }
- function validateForm() {
- let x = load('carPlate');
- if (x == "") {
- alert("Uzupelnij wszystkie pola nicponiu!");
- return false;
- }
- x =load('carModel');
- if(x==""){
- alert("Uzupelnij wszystkie pola nicponiu!");
- return false;
- }
- x = load('yearOfTransaction');
- if(x==""){
- alert("Uzupelnij wszystkie pola nicponiu!");
- return false;
- }
- //baza danych
- }
- // function check() {
- // let x = document.getElementsById("yearOfTransaction");
- // alert(x.value);
- // if(x.value < 1950){
- // x.setAttribute("value", "1950");
- // }
- // else if (x.value > 2019){
- // x.setAttribute("value", "2019");
- // }
- // }
- function load(name) {
- let variable;
- variable = document.getElementById(name).value;
- return variable;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement