私はこの問題を抱えています。やりたいのは、リフレッシュしないことです。私が欲しいのは、検索してEnterキーを押すと、プレイリストが更新されないことです。
私のページのウェブサンプルはhttp://cocopop12.site11.com/v1.7/index.phpです
私のjqueryスクリプトは正しいですか?ページが更新されないように ajax を使用する必要がありますか?
$(function(){
$('input[name="searchsubmit"]').click(function(e) {
e.preventDefault();
var qS = $('#qsearch').val();
$.ajax({
type:"GET",
url:"",
data: qS,
dataype: 'html',
success: function(data){
$('input#qsearch').html(data);
return false;
}
})
});
});
ボタンは
<div class="search">
<form id="quick-search" action="" method="get">
<p>
<label for="qsearch">Search:</label>
<input class="tbox" id="qsearch" type="text" name="q" value="Keywords" title="Start typing and hit ENTER" onblur="if(this.value=='') this.value='Keywords';" onfocus="if(this.value=='Keywords') this.value='';" />
<input class="btn" alt="Search" type="image" name="searchsubmit" title="Search" src="./css/search.gif" />
</p>
</form>
</div>
時間をありがとう。