$(function() { //初始化查询条件 initQueryCond(); }); //初始化查询条件 function initQueryCond(){ var anytextReq=""; var queryMode="";//查询模式 var anytextValue = "用户名";//关键字指定 if(anytextReq==""){ $("#anytext").val(anytextValue); $("#anytext").attr("style","color:#D5D5D5"); } if(queryMode=="more"){//查询模式的判断 showDiv("queryCondition"); }else{ closeDiv("queryCondition"); } $("#anytext").click(function(){ if($("#anytext").val()==anytextValue){ $("#anytext").val(""); } $("#anytext").attr("style","color:black"); }); $("#anytext").blur(function(){ if($("#anytext").val()==""){ $("#anytext").val(anytextValue); $("#anytext").attr("style","color:#D5D5D5"); } }); } //关键字查询需求 function queryAny(){ var anytext=$("#anytext").val(); if(anytext==anytextValue) anytext=""; window.location.href="/order/listUser.action?anytext="+anytext+"&queryMode=any";//queryMode=any关键字查询 } //高级查询-初始化 function to_queryMore(){ $("#userid").val(""); $("#anytext").val(""); showhideDivs('queryCondition'); } //查询 function to_query(){ $("#currentPage").val("1"); to_searchorder('',''); } function to_searchorder(torderby,torder){ var vform = document.myform; vform.target='_self'; document.getElementById("page_orderby").value=torderby; document.getElementById("page_order").value=torder; vform.action= "/order/listUser.action?queryMode=more";//queryMode=more高级查询 vform.submit(); }
dw制作PHP高级搜索功能,web页面之搜索、高级搜索功能
最新推荐文章于 2021-03-24 22:05:08 发布