0
我有这种形式。动态表格php ajax
<form id="form1" name="form1" method="post" action="">
<p>
<label for="textfield"></label>
Id:
<input type="text" name="textfield" id="textfield" />
</p>
<p>
<label for="textfield2"></label>
Name:
<input type="text" name="textfield2" id="textfield2" />
</p>
<p>
<label for="textfield3"></label>
Apellido:
<input type="text" name="textfield3" id="textfield3" />
</p>
<p>
<input type="submit" name="button" id="button" value="Enviar" />
</p>
<p> </p>
</form>
,当我写去ID,然后脉冲TAB键,输入姓名和apellido必须得到我的mysql数据库信息。
我希望你能理解我。
你还没有显示任何javascript,或者php –
试图更加详细。为什么你需要ajax和jquery – Ibu
我认为他想在编译第一个文本字段时进行查询。例如:编译ID“textfield”时,他需要通过查询数据库将数据写入其他两个文本字段。这就是为什么他需要jQuery和Ajax。先生,http://api.jquery.com/jQuery.post/完成你的工作。看看这个例子,并使用json_encode和PHP编码数据。 – briosheje