javascript - 如何取消JS调用,而是直接输出结果
黄舟
黄舟 2017-04-11 12:03:18
0
0
160

js代码:

var search_query = ''; var split_query = ''; var ajax_template = ''; $(function() { $('#list_nav a').click(function () { window.location.hash = $(this).attr('href').replace(/#/g, ''); $('#aw-search-type').html($(this).text()); $('#search_result').html('

'); $('#search_result_more').attr('data-page', 1).click(); }); $('#search_result_more').click(function() { var _this = this, page = parseInt($(this).attr('data-page')) || 1 var request_url = G_BASE_URL + '/search/ajax/search_result/search_type-' + window.location.hash.replace(/#/g, '') + '__q-' + encodeURIComponent(search_query) + '__template-' + ajax_template + '__page-' + page; if (typeof search_recommend != 'undefined') { var request_url = request_url + '__is_recommend-1'; } $(this).addClass('loading'); $.get(request_url, function (response) { if (response.length) { if ($(_this).attr('data-page') == 1) { $('#search_result').html(response); } else { $('#search_result').append(response); } $('#search_result .aw-title a').highText(split_query, 'span', 'aw-text-color-red'); $(_this).attr('data-page', parseInt($(_this).attr('data-page')) + 1); } else { if ($(_this).attr('data-page') == 1) { $('#search_result').html('

' + _t('没有内容') + '

'); } $(_this).addClass('disabled'); } $(_this).removeClass('loading'); }); return false; }); switch (window.location.hash) { case '#questions': case '#topics': case '#users': case '#articles': $("#list_nav a[href='" + window.location.hash + "']").click(); break; default: $("#list_nav a[href='#all']").click(); break; } });

php代码

想要直接输出结果,而不是通过js调用,大神们指点下,这个是一个搜索结果,
为了让搜索引擎收录

或者有没有懂wecenter的请教下(http://wenda.wecenter.com/sea...),wecenter搜索结果怎么让他不是通过js调用的,我想要直接输出结果,以便搜索引擎收录

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all (0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!