I want to get a value from a javascript variable and put it inside a input
value to send via get
.
My JS looks 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><divid="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 am not able to put the result in value, it is perfect, but in input
does not catch.