0
I made a check box and wanted to appear the choice in a form as soon as chosen. But the option only appears if I enter after choosing the option or if I choose an option and go changing with the arrow key. Is there any way so that the person click on the box and choose the desired option it already appears in the form?
Code:
<html>
<body>
Cliente <select id='nome' type='text' value='' onkeyup="insere()" />
<option></option>
<option>joão</option>
<option>Camila</option>
<option>Marcelo</option>
<option>Iago</option>
<option>Willian</option>
<option>Neide</option>
<option>Takaro</option>
</select>
<p>CLIENTE: <span class="cliente"></span>
<script type="text/javascript">
var cliente = document.getElementById('nome');
var cliente1 = document.getElementsByClassName('cliente')[0];
function insere() {
cliente1.innerHTML = cliente.value;
}
</script>
</body>
</html>
had not learned about the oncharge vlw tip
– wilian black