I'm writing a keyup event on a search input like:
$("#searchbox").keyup(function(e){
var curKey = e.which;
var text = $(this).attr("value");
if(curKey == 13){
$(".menu_tab").removeClass("menu_bg");
$(".mainGreyBox").css("display","none");
$("#aboutSearchResult").css("display","block");
}else{
var text = $(this).attr("value");
console.log(text);
$("#searchresult").empty();
var SearchMan = new SearchModel().init(text); //显示search列表
$(".global_acResults").show();
}
I want to show a new page which id is "aboutSearchResult" when I enter the search words and then press the enter on the keyboard.But I find that the page I want to show flash past and then the page shows like:
But I don't know why,looking for your help,thanks.
ps:#searchbox
is an input element.