这部法典:
<input type="text" id="participant1" name="name[1][]" value="Andi"/> </p>
<input type="text" id="idparticipant1" name="idparticipant[1][]" value="1001"/>
<input type="text" id="participant2" name="name[2][]" value="Smith"/> </p>
<input type="text" id="idparticipant2" name="idparticipant[2][]" value="1005" />
页: 1
<script src="jquery-1.4.js"></script>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery.autocomplete.js"></script>
<link rel="stylesheet" type="text/css" href="jquery.autocomplete.css" />
<script>
$(document).ready(function()
{
$( [id^="participant"] ).keyup(function()
{
var txt = $(this).val();
$.ajax({
type: "POST",
url: "blue.php",
data: "nameparticipant=" + txt,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data)
{
$(this).next().val(data.d);
//alert(data.d);
}
//failure: failerEvent
});
});//keyup
});
</script>
蓝皮。 php
<?php
$nameparticipant=$_POST["nameparticipant"]);
$res = mysql_query("select * from table where upper(name) like $nameparticipant% ");
$t=mysql_fetch_array($res);
echo"$t[nik]";
?>
除“安道尔”外,如果是参与者的关键投入名称,那么价值就变了0。 而当它再一次回头来时,它的价值就改变了。
可以做些什么?