How can I generate a result from jquery + ajax in a another text box
<form action="someanotherpage.php">
<input type="text" name="data" value="" id="data"/>
<input type="text" name="response_data_here" value="" id="response"/>
<input type="submit" value="Apply" />
</form>
EDIT: I edited some content..Im so sorry forgot to mention that I will use the #data textbox to query it in a database and I will display the result in the #response textbox ,forgive me I was confused at the moment
any suggestion guys?is that possible?any help is appreciated. thanks
This must do the trick:
Your Form:
<form action="someanotherpage.php">
<input type="text" name="data" value="" id="data "/>
<input type="text" name="response_data_here" value="" id="data2" />
</form>
JQuery:
$(function(){
$("#data").keypress(function(){
$("#data2").val($(this).val());
});
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.