I need to pass as parameter the content that is in textbox
, in onclick
of a button. How can I do this?
This is the Html code:
<div id="popup">
<table width="300" height="160">
<tr>
<td colspan="3" height="20" style="text-align:right"><input type="submit" value="Fechar X" id="FecharModal" onclick="fecharDialog()" /></a></td>
</tr>
<tr>
<td colspan="3" style="text-align: center; font-weight: bold; font-size:15px"><div id="texto"><p></p></div></td>
</tr>
<tr>
<td height="30" style="text-align:center"><input type="submit" value="Sim" id="ValidaSim" onclick="ValidaSim()" /></td>
<td height="30" style="text-align:center" colspan="2"><input type="submit" value="Não" id="ValidaNao" onclick="ValidaNao()" /></td>
</tr>
<tr>
<td height="30" style="text-align:center; display:none"><input type="text" id="txtValid" /></td>
<td height="30" style="text-align: center; display: none"><input type="text" id="txtDrop" /></td>
<td height="30" style="text-align: center; display: none"><input type="text" id="txtMatricula" /></td>
</tr>
</table>
In the onclick of the input Valida I need to pass the text that is in textbox
txtValid, as a parameter. In the onclick of the input valid, I do not need to pass the text of all textbox
down as parameters.
<td height="30" style="text-align:center; display:none"><input type="text" id="txtValid" /></td>
<td height="30" style="text-align: center; display: none"><input type="text" id="txtDrop" /></td>
<td height="30" style="text-align: center; display: none"><input type="text" id="txtMatricula" /></td>