-1
With this code we can send a single value to the search field. Now, taking this example, how do we insert more values in sequence with the same button, for example: value 1, health, fun, yesterday 5, etc.
Note that the values cannot be equal and it is also necessary that the previous value is erased and the new appears; that is, when clicking Value 1 should give rise to health, health should give place to fun and so on.
http://jsfiddle.net/g506bxL4/1/
<form id="form1" name="form1" method="post">
<p>
<input type="button" name="set_Value" id="set_Value" value="submit" onclick="setValue()" />
</p>
<p>
<label>
<input type="text" name="bbb" id="bbb" />
</label>
</p>
</form>
<script type="text/javascript">
function setValue() {
document.getElementById('bbb').value = "valor 1";
}
</script>
I’m not getting any results, maybe someone can change the code in http://jsfiddle.net/g506bxL4/1/, just change and save to get a new page and address.
– Clubesorte
Attention, it is necessary that the previous value is deleted and the new one appears; that is, when you click the value1 must give place to the value2 and so on. Maybe someone can change the code to http://jsfiddle.net/g506bxL4/1/, just change and save to get a new page and address.
– Clubesorte
And the values cannot be equal, for example Value 1, health, fun, yesterday 5... and it is also necessary that the previous value is erased and the new appears; that is, when clicking Value 1 should give way to health 2, health should give place to fun, and so on.
– Clubesorte
You can take this example and apply your need.
– GeekSilva