Authored by wangqing

搜索完善

... ... @@ -124,7 +124,7 @@
<div class="search float-left {{searchcate}}" >
<form action="http://search.yohobuy.com" method="get" id="searchForm">
<span class="searchspan">
<input class="searchinput" type="text" name="keyword" id="query_key" autocomplete="off" x-webkit-speech="" lang="zh-CN" x-webkit-grammar="builtin:translate" value="" onfocus="if(this.value==this.defaultValue){this.value='';this.style.color='#333'}" onblur="if(this.value==''){this.value=this.defaultValue;this.style.color='#999'}" maxlength="30"></span>
<input class="searchinput" type="text" name="query" id="query_key" autocomplete="off" x-webkit-speech="" lang="zh-CN" x-webkit-grammar="builtin:translate" value="" onfocus="if(this.value==this.defaultValue){this.value='';this.style.color='#333'}" onblur="if(this.value==''){this.value=this.defaultValue;this.style.color='#999'}" maxlength="30"></span>
<a class="icon-search" href="javascript:submitSearch();"></a>
<ul class="search-list"></ul>
</form>
... ...
... ... @@ -75,7 +75,8 @@ function getSource(column, postition, event) {
} catch (e) {}
}
function submitSearch() {
window.submitSearch = function() {
var $keywordinput = $('#query_key').val();
var column = 'Search';
var postition = 'Head Search';
... ... @@ -97,6 +98,7 @@ function submitSearch() {
}
}
}
/**
* 定义购物车扩展
*/
... ... @@ -185,7 +187,7 @@ function actionGoodsCart() {
listIndex = (listIndex + 1) % queryNum;
getText(this);
} else if (event.which === 13) {
submitSearch();
window.submitSearch();
} else {
getKeywords(this);
}
... ...