li 7 years ago
parent
commit
94ec965090
2 changed files with 7 additions and 7 deletions
  1. 6 6
      js/common.js
  2. 1 1
      js/head-staticize.js

+ 6 - 6
js/common.js

@ -53,15 +53,15 @@ $("#searchContent").keydown(function(e) {
53 53
$("#hsearchContent").keydown(function(e) {
54 54
	if(e.which == 13) {
55 55
		var searchContent = $("#hsearchContent").val();
56
		if($(this).siblings()[0].id=="searchh") {
57
			alert(1)
58
		}else{
59
			alert(2)
60
		}
61 56
		location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
62 57
	}
63 58
})
64

59
$("#hsearchContentb").keydown(function(e) {
60
	if(e.which == 13) {
61
		var searchContent = $("#hsearchContentb").val();
62
		location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
63
	}
64
})
65 65
$("#hsearch").on("click", function() {
66 66
	var searchContent = $("#hsearchContent").val();
67 67
	setTimeout(function(){

+ 1 - 1
js/head-staticize.js

@ -13,7 +13,7 @@ var headerHtml = '';
13 13
						'</ul>' +
14 14
					'</div>' +
15 15
					'<div class="searchblock">'+
16
				    '<input type="text" placeholder="搜索专家、资源、文章" class="search-txt" id="hsearchContent">'+
16
				    '<input type="text" placeholder="搜索专家、资源、文章" class="search-txt" id="hsearchContentb">'+
17 17
						'<div class="search-btn" id="searchh"><span class="search-icon"></span></div>'+
18 18
					'</div>'+
19 19
					//未登录状态