Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- */
- const minZakres = 1;
- const maxZakres = 200;
- var zakres;
- var liczby;
- var losowania;
- var sposob;
- function btnLosowanie_onclick()
- {
- alert("Losowanie");
- }
- function btnCzyszczenie_onclick()
- {
- alert("Czyszczenie");
- document.getElementById("txtZakres").value = "49";
- document.getElementById("txtLiczby").value = "6";
- document.getElementById("txtLosowania").value = "20";
- document.getElementById("rbSposobPowtorzeniaTak").checked=true;
- //document.getEleemntById("rbSposobPowtorzeniaNie").checked=false;
- document.getElementById("txtKomunikat").innerHTML="Gotowy!";
- }
- function poprawneDane()
- {
- zakres = parseInt(document.getElementById("txtZakres").value);
- liczby = parseInt(document.getElementById("txtLiczby").value);
- losowania = parseInt(document.getElementById("txtLosowania").value);
- if(document.getElementById("rbSposobPowtorzeniaTak").checked) sposob="P";
- else sposob="B";
- txtKomunikat.innerHTML = "Gotowy!";
- if(isNan(zakres))
- {
- txtKomunikat.innerHTML = "Komunikat o błędzie!";
- return false;
- }
- if(isNan(liczby))
- {
- txtKomunikat.innerHTML = "Komunikat o błędzie!";
- return false;
- }
- if(isNan(losowania))
- {
- txtKomunikat.innerHTML = "Komunikat o błędzie!";
- return false;
- }
- if(zakres < minZakres || zakres > maxZakres)
- return true;
- }
- function wykonajLosowanie()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement