This function is often used in many novel stations and photo stations. You can pay attention to it. This tutorial is provided by enthusiastic netizens on the forum. Here's how to modify it:
First, we open include/arc.archives.class.php to find the following code:
$this ->PreNext ['pre ']="Previous:<a href=' $mlink '>{$preRow ['title']}</a>";
Replace with the following code:
$this->PreNext['pre'] = "$mlink ";
$this ->PreNext ['next ']="Next:<a href=' $mlink '>{$nextRow ['title']}</a>";
In this way, the PHP code can be saved after modification. Next, we call it with js on the content page. Put the following code:
<script type="text/javascript" language="javascript">
 < !-- document.onkeydown = nextpage;
 var prevpage = '{dede:prenext get='pre '/}';
 var nextpage = '{dede:prenext get='next '/}';
 var index_page = "index.html";
 //var bookpage="index.html";
 function nextpage(event) {
  eventevent = event ? event: (window.event ? window.event: null);
  //if (event.keyCode==13) location=bookpage
  if (event.keyCode == 13) location = index_page
  if (event.keyCode == 37) {
If (prevpage!=''&&prevpage!='previous: no more ') location=prevpage;
Else alert ('This is the first page ');
  }
  if (event.keyCode == 39) {
If (nextpage!=''&&nextpage!='Next: No more ') location=nextpage;
Else alert ('this is the last page ');
  }
 }
 //-->
 function getElement(aID) {
  return (document.getElementById) ? document.getElementById(aID) : document.all[aID];
 }
 function makeRequest(url) {
  http_request = false;
  if (window.XMLHttpRequest) { //Mozilla,Safari,...
   http_request = new XMLHttpRequest();
   if (http_request.overrideMimeType) {
    http_request.overrideMimeType('text/xml');
   }
  } else if (window.ActiveXObject) { //IE
   try {
    http_request = new ActiveXObject("Msxml2.XMLHTTP");
   } catch(e) {
    try {
     http_request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {}
   }
  }
  if (!http_request) {
   alert('Giving up:(Cannot create an XMLHTTP instance)');
   return false;
  }
  return http_request;
 }
</script>

Post reply

Can't comment until