-2
Follow the example below of what is happening, I declared 1198805- and the rest is generated. But with this defect below.
1198805522 11988052636 11988054970 1198805929 11988054269 11988054150 1198805671 1198805848 11988055359
Follow the Code in Javascript used :
var maximo = 8999;
var resultados = 40;
var stop;
var contador = 0;
//var txt = document.getElementById("txtsenha").value;
var txt = "11" + "" + "9" + "9204" + "-";
// document.getElementById(el).innerHTML += txt + x + "<br>";
document.getElementById('contadorrr').innerHTML = '<font color=#FFF size="6"> <b>-</b>Loanding<b>-</b> </font><font size="29">[</font><font size="59" color=#1E90FF> ' + contador + '</font><font size="29">]</font><font size="29" color=#1E90FF>' ;
var i, arr = [];
for (i = 0; i < maximo; i++) {
arr[i] = i + 1;
}
var p, n, tmp;
for (p = arr.length; p;) {
n = Math.random() * p-- | 0;
tmp = arr[n];
arr[n] = arr[p];
arr[p] = tmp;
}
for (var i = 0; i < resultados; i++) {
document.getElementById('out').innerHTML += txt + arr[i]+ '<br> ';
}
</head>
<body style="background-image:url(https://i.ytimg.com/vi/gJ16uN47EAk/maxresdefault.jpg);">
<hr>
<div class="configdiv" align="center" style="color: #F8F8FF;">
<p><font size="15">-</font> <font size="7" color="#B5B5B5">SPACE GHOST V1.0</font> <font size="15">-</font></p>
<img align="center" src="http://img15.deviantart.net/49f9/i/2015/167/5/2/space_ghost_logo_by_topher147-d8x52wm.png" width="300" height="250" >
<div id="contadorrr"><font size="20" color="#FFD700"><strong></strong></font></div>
<br><br><HR>
<hr>
<font size="20" color="#20B2AA">[</font> <font size="20" color="#D3D3D3"><strong> NUMEROS </strong></font> <font size="20" color="#20B2AA">]</font>
<div id="out" align="center" style="color: #00BFFF;"></div>
<hr></hr>
<div id="interval" align="center" style="color: #00FF00;"></div>
The 4 digits drawn, total 5040 different combinations without repetition However in my code it generates broken lines of 10, sometimes of 12 digits, and this interferes in the total of REAL results (11 digits)
Does anyone know how to limit the code to generate only 11 digits ?
Thank you.
As already explained in the deleted version of the same question, the essential thing is this: Fill left zeros in Javascript
– Bacco
And the shuffling without repeating part is here: Random numbers without repetition
– Bacco
Thanks @Bacco was sorry for the other question, I had not understood what you went through , thanks msm
– Mandrake Venom
The important thing is that it solved. Over time you will get the feel of the site and enjoying better. It is that almost every time we have something ready on the site, we already point, both to advance the solution when possible, as to help other colleagues with the same problem (and when there is indication of duplicate, it is mere organization, to concentrate all the answers in one place, it is not punishment and not sign of anything necessarily wrong with your question). Whenever you get in doubt or find something strange, just leave a comment (not in the body of the question) that there are plenty of people wanting to help.
– Bacco
And as soon as you have a few more dots, you will be able to join the network chat, which is a quick way to ask questions about how to improve or find a post about a particular subject, or any doubt or idea that doesn’t fit well in the question-answer format.
– Bacco
Thanks for the attention, I’ve done my part and released the chat, pity that not so many people interested in javascript , but it will be much more useful to use the chat really ,to reading a booklet I found on google, but there is something that only someone explaining even to learn, if you are from the area of boars , will see me mt through here kkk
– Mandrake Venom
In business hours brings more people together. Chat is good for more interactive things. Objective questions are good to ask right here, so it helps more people, and it gets organized. If you have interest and time, we have [help] that has some cool tips, and has the site meta, which is "the site on the site". In the goal we do not discuss programming itself, but discuss the standards of the site, what is accepted or not, and help shape the community. It is a good source of reading on the behaviors and methodologies used in the main site.
– Bacco