Edit D:\chineseall_products\bak\digitalLib6\js\ajaxPage.js
function enterGoPage(obj, event) { var event = event ? event : (window.event ? window.event : null); if (event.keyCode == 13) { goPageFun(obj); } } function goPageFun(obj) { var goPageId = obj.getAttribute("goPageId"); var page = document.getElementById(goPageId + "goPage").value; var totalPage = obj.getAttribute("totalPage"); var callBack = obj.getAttribute("callBack"); page = page.replace(/(^[\s]*)|([\s]*$)/g, ""); if (page == "" || page <= 0 || isNaN(page)) { alert("????????????"); return false; } if (page > totalPage) { page = totalPage; } eval(callBack + "(" + page + ")");; } function appendPageHtml(id, currentPage, totalPage, callBack) { var comments = "<div class=\"u-page\">"; if (currentPage > 1) { comments += "<a class=\"next\" href=\"javascript:"+callBack+"(1);\">???</a>"; comments += "<a class=\"next\" href=\"javascript:"+callBack+"("+ (currentPage - 1); comments += ");\">?????</a>"; } else { comments += "<a class=\"pre noPage\">???</a> <a hidefocus=\"hidefocus\" "; comments += "class=\"pre noPage\">?????</a>"; } comments += "<ul id=\"bookpage-a\">"; var start = currentPage - 2; if (start <= 0) start = 1; var end = start + 5; if (end > totalPage) end = totalPage; for (var i = start; i < end + 1; i++) { comments += "<li"; if (currentPage == i) comments += " class=\"crt\""; comments += "><a href=\"javascript:"+callBack+"(" + i + ");\" pageno=\""; comments += i + "\">" + i + "</a></li>"; } comments += "</ul>"; if (currentPage < totalPage) { comments += "<a class=\"next\" href=\"javascript:"+callBack+"("; comments += (currentPage + 1) + ");\">?????</a>"; comments += "<a class=\"next\" href=\"javascript:"+callBack+"("; comments += totalPage + ");\">???</a>"; } else { comments += "<a class=\"pre noPage\">?????</a><a class=\"pre noPage\">???</a>"; } comments += "<a><input type=\"test\" id=\"" + id + "goPage\" name=\"goPage\" "; comments += "style=\"width: 20px;\" onkeyup=\"enterGoPage(this, event);\" totalPage=\""; comments += totalPage + "\" callBack=\"" + callBack + "\" goPageId=\"" + id + "\"></a>"; comments += "<a><input type=\"button\" value=\"go\" onclick=\"goPageFun(this)\" "; comments += "totalPage=\"" + totalPage + "\" callBack=\"" + callBack + "\" goPageId=\"" comments += id + "\"></a>"; comments += "</div>"; document.getElementById(id).innerHTML = comments; }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de