February 2019 0 8 Report
Witam czy ktoś może sprawdzić co z tym kodem jest nie tak nie chce mi działać i nie widzę błędu


<html><head></head>


<SCRIPT LANGUAGE="JavaScript">


function numbers() {var nummenu = document.lotto.numbercount;var numbercount = nummenu.options[nummenu.selectedIndex].value*1;var maxnumbers = document.lotto.maxnum.value*1;if (numbercount > maxnumbers) {alert("Be sure to select a max lottery number value!");}else {var ok = 1;r = new Array (numbercount);for (var i = 1; i <= numbercount; i++) {r[i] = Math.round(Math.random() * (maxnumbers-1))+1;}for (var i = numbercount; i >= 1; i--) {for (var j = numbercount; j >= 1; j--) {if ((i != j) && (r[i] == r[j])) ok = 0; } }if (ok) {var output = "";for (var k = 1; k <= numbercount; k++) {output += "Numer " + k + " = " + r[k] + "\n";}document.lotto.results.value = output;} else numbers(); }}


</script><body></body>
</html>

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.