var tspan = GetQueryString("TSpan"); var wfstate = GetQueryString("WFState"); //if (wfstate == null) // wfstate = 1; function Search_InitPage() { if (tspan == null || tspan == undefined) tspan = "3"; document.getElementById('offCanvasBtn').addEventListener('tap', function () { window.location.href = "./SearchCondtion.htm?TSpan=" + tspan + "&WFState=" + wfstate; }); document.getElementById("SearchKey").addEventListener("keypress", function (event) { if (event.keyCode == "13") { document.activeElement.blur(); //收起虚拟键盘 Search_InitPage(); //完成搜索事件 event.preventDefault(); // 阻止默认事件---阻止页面刷新 } }); //清空查询条件的事件 mui("#SearchKey")[0].addEventListener('focus', function () { mui(".mui-icon-clear")[0].addEventListener('tap', function () { Search_InitPage(); }); }) var _html = ""; var handler = new HttpHandler("BP.Cloud.HttpHandler.CCMobilePortal"); handler.AddPara("SearchKey", $("#SearchKey").val()); handler.AddPara("TSpan", tspan); handler.AddPara("WFState", wfstate); handler.AddPara("DTFrom",GetQueryString("DTFrom")); handler.AddPara("DTTo", GetQueryString("DTTo")); var data = handler.DoMethodReturnString("Search_Init"); if (data.indexOf("err@") != -1) { mui.alert(data); console.log(data); _html += "