各位大神好:
想請問為什麼我按分頁後,第2頁會正常(參數都有帶進來),第3頁後只剩下頁數的參數有再進網址,其他參數都帶不進網址,謝謝
function search() {
if(event.key === 'Enter') {
url=window.location.origin+window.location.pathname;
num = document.getElementsByName("page")[0].value;
empno = document.getElementsByName("empno")[0].value;
orgid=document.getElementsByName("orgid")[0].value;
const a=url+'?page='+num+'&uid=<%=session("uid")%>&orgid=<%=request("orgid")%>&empno=<%=request("empno")%>&approvestatus='+approvestatus + '& rewarddate=<%=request("rewarddate")%>')
window.location.replace(a);
}
}
<form>
<%if rs.pagecount >1 then%>
<div style="float:right">輸入頁次: <input type="text" name="page" size="3" onkeydown="search()">
頁次:<font color="red"><%=page%>/<%=rs.pagecount%></font></div>
<% end if %>
</form>
<form>
<input type="text" name="empno" size="3">
<input type="text" name="orgid" size="3">
</form>