diff --git a/p/index.html b/p/index.html index 83abc46..19f949f 100644 --- a/p/index.html +++ b/p/index.html @@ -18,6 +18,10 @@ 0 +
+ + +
@@ -76,6 +80,26 @@ pid.focus(); pid.selectionStart = pid.selectionEnd = pid.value.length; }); + // 上一张 + document.getElementById("prev").onclick = function () { + if (pid.value === '') { + pid.focus(); + pid.selectionStart = pid.selectionEnd = pid.value.length; + return; + } + pid.value = pid.value - 1; + enter(); + }; + // 下一张 + document.getElementById("next").onclick = function () { + if (pid.value === '') { + pid.focus(); + pid.selectionStart = pid.selectionEnd = pid.value.length; + return; + } + pid.value = pid.value - 0 + 1; + enter(); + }; function clearPid () { if (pid.value !== '') {