0
私は以下のスクリプト表示結果
<script>
$(function(){
$('.input').keyup(function(){
var a = $('.input').val();
$.post('actions/action_user_search.php',{"search":a},function(data){
//show results
$('#display').html(data);
});
});
});
</script>
を使用してDBからkeyup
上のデータを取得していますし、いないテキストボックス以下
echo '<h1>Search User</h1>
<form action= "actions/action_user_search.php" method="POST" >
<input type="text" name="search" class="input">
</form>
<div id="display" style="margin-top:50px" ></div>';
どのように私はdiv要素内(ここに示した方法を使用して、リストではなくてテキストボックスに結果を表示することができますid = display)
ありがとうございました
ありがとうテキストボックスに設定:
data
が文字列の場合、このコードは、あなたのテキストボックスにテキストを設定しますそれは今私が理解する作品 – ErrorMan