Date.prototype.format = function(fmt) { var o = { "M+" : this.getMonth()+1, //月份 "d+" : this.getDate(), //日 "h+" : this.getHours(), //小时 "m+" : this.getMinutes(), //分 "s+" : this.getSeconds(), //秒 "q+" : Math.floor((this.getMonth()+3)/3), //季度 "S" : this.getMilliseconds() //毫秒 }; if(/(y+)/.test(fmt)) { fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); } for(var k in o) { if(new RegExp("("+ k +")").test(fmt)){ fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); } } return fmt; }; $(document).ready(function () { if ($("#keyword").val() != "1万多条政府服务信息在此供您查找......") { $("#keyword").css("color" , "black"); } }); function setTxt() { if ($("#keyword").val() == "") { $("#keyword").val("1万多条政府服务信息在此供您查找......"); $("#keyword").css("color" , "#999"); } } function deleteTxt() { if ($("#keyword").val() == "1万多条政府服务信息在此供您查找......") { $("#keyword").val(""); $("#keyword").css("color" , "black"); } } function searchhead() { var key = $("#keyword").val(); if (key == "" || key == "1万多条政府服务信息在此供您查找......") { return; } location.href = "${base}/platform/platform!search_List.action?key=" + encodeURI(encodeURI(key))+"&pageNumber=1"; } $(function() { $.get("${base}/platform/platform!hotSearch.action", function(data){ var myobj=JSON.parse(data); var obj = myobj.list; var html ="热门搜索:"; for(var i=0;i'; html += obj[i].serviceWebName; html +=''; html += ''; html += ''; html +=''; html += obj[i+1].serviceWebName; html +=''; html += ''; html += ''; i=i+1; } $("#tbody").html(html); }); } function tipsClose(){ $(".serviceWebs").hide(); } function weixin(){ $(".weixinDiv").toggle(); } function moveWeixin(){ $(".weixinDiv").hide(); } function weibo(){ //$(".weiboDiv").toggle(); window.open("https://weibo.com/u/3089697494"); } function moveWeibo(){ $(".weiboDiv").hide(); } function showPageHome(){ $("#logoImg").attr("src","/sd12345/template/platform/img/logoa3.png"); } function hidePageHome(){ $("#logoImg").attr("src","/sd12345/template/platform/img/logoa2.png"); } function record(){ //location.href="${base}/platform/platform!addLiveRecord.action"; $.get("${base}/platform/platform!addLiveRecord.action"); }