最初のテキストフィールドでオートフィルを使用jquery
しているフォームがあります。このテキストフィールドは"producto1"と呼ばれます。
私が望むのは、ユーザーが "producto1" に情報を書き込むと、コンテンツが" marca1"に自動的にロードされると、このフィールドのコンテンツがデータベースからロードされることです。
これは私のコードです:
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="545"><div align="center">
<input name="producto1" type="text" class="textfield4" id="producto1" value="" size="65" />
</div></td>
<td width="385"><div align="center">
<input name="marca1" type="text" class="textfield5" id="marca1" size="10" maxlength="5" onKeyPress="return handleEnter(event);">
</div></td>
<td width="385"><input name="cantidad1" type="text" class="textfield5" id="textfield2" size="10" maxlength="5" onKeyPress="return handleEnter(event);"></td>
</tr>
</table>
「marca1」フィールドに表示される情報はデータベースから読み込まれますが、問題は、ajax を使用してこの 2 番目のフィールドを自動的に入力する方法がわからないことです。