(function () { var LOGURL = 'https://sp1.baidu.com/5b1ZeDe5KgQFm2e88IuM_a/cm.gif'; var params = 'type=wwwerror&terminal=www'; var img = new Image(); img.src = LOGURL + '?' + params; })(); (function () { if(window.recommend && window.recommend.query && window.recommend.query.length > 0) { var recommendWrapper = document.createElement('div'); var recommendHtml = '
排名 |
---|
' + i + '' + queryArray[i-1].word + ' |
' + i + '' + queryArray[i-1].word + ' |
'; recommendWrapper.setAttribute('id', 'content_right'); document.getElementById('wrapper_wrapper').insertBefore(recommendWrapper, document.getElementById('content_left')); var recommend = document.getElementById('content_right'); recommend.innerHTML = recommendHtml; } })(); (function(){ var bds = { util: {} }; var c = document.getElementById('kw').parentNode; bds.util.getWinWidth = function(){ return window.document.documentElement.clientWidth; }; bds.util.setFormWidth = function(){ var width = bds.util.getWinWidth(); if(width < 1217) {bds.util.setClass(c, 'ip_short', 'add')} else {bds.util.setClass(c, 'ip_short', 'remove')}; }; bds.util.setClass = function(obj, class_name, set) { var ori_class = obj.className, has_class_p = -1, ori_class_arr = [], new_class = ''; if(ori_class.length) ori_class_arr = ori_class.split(' '); for( i in ori_class_arr) { if(ori_class_arr[i] == class_name) has_class_p = i; } if( set == 'remove' && has_class_p >= 0) { ori_class_arr.splice(has_class_p, 1); new_class = ori_class_arr.join(' '); obj.className = new_class; } else if( set == 'add' && has_class_p < 0) { ori_class_arr.push(class_name); new_class = ori_class_arr.join(' '); obj.className = new_class; } } bds.util.setFormWidth(); if (typeof document.addEventListener != "undefined") { window.addEventListener('resize', bds.util.setFormWidth, false); document.getElementById('kw').addEventListener('focus', function(){bds.util.setClass(c,'iptfocus', 'add');}, false); document.getElementById('kw').addEventListener('blur', function(){bds.util.setClass(c,'iptfocus', 'remove');}, false); } else { window.attachEvent('onresize', bds.util.setFormWidth, false); document.getElementById('kw').attachEvent('onfocus', function(){bds.util.setClass(c,'iptfocus', 'add');}, false); document.getElementById('kw').attachEvent('onblur', function(){bds.util.setClass(c,'iptfocus', 'remove');}, false); } })();