1
I am wanting to take a value of a javascript variable and put inside a input
value to send via get
.
My JS is like this:
$(window).load(function() {
var count = 10;
$('a[name=alex]').click(function() {
document.getElementById("resultado").innerHTML = "" + count + "";
count += 10;
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div id="contador">
<div class="cont_sub0">
<h4>Pontuação</h4>
</div>
<div class="cont_sub1"><span id="resultado">000</span>
</div>
<input type="text" value="resultado" id="resultado">
</div>
I’m not able to put the result in value, this showing perfect, but, no input
undesirable.