0
Adding value to text?
And how to make it stay in this format? for example: ADQ20180601513610 (with 20 characters)
Example:
function insertNewAdq() {
var pk = document.getElementById("txtPk").style;
pk.value = ("ADQ" + (Math.random() * 10000000000));
console.log(pk.value);
}
<input id="txtPk" class="txtPk_adq" name="name_txt" style=" width:100px;" type="text"><br>
<button onclick="insertNewAdq()"> Teste </button>
is an Random or a number based on date/time?
– Ricardo Pontual
a random number based on the date/time/min/sec/millisec
– Sora
The version I made is wrong, I would like to know how to do this other way and how to assign to text
– Sora
wouldn’t be much of a Ranger then, but to generate that number in the format you want, I put in the answer
– Ricardo Pontual