Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of turning pages by pressing the Keyboard Direction key in dedecms

Shulou Source: shulou.com Published: 2022-06-02 04:52:16 10月04日 Update

This article is to share with you about dedecms's method of pressing the keyboard arrow keys to achieve page turning. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Dedecms press the keyboard key how to achieve (the previous article and the next page turning) function?

Press the keyboard key to realize the page turning function of the previous article and the next article. There must be a lot of webmaster friends who want to achieve this function. In fact, this function is often used in many novel stations and picture stations. Let's talk about the specific modification and manipulation. You can't miss it if you are interested. I hope it can help you.

In fact, this function is often used in many novel stations and picture stations. You can note that this tutorial is provided by enthusiastic netizens in the forum. Let's talk about specific modification and manipulation:

First, let's open include/arc.archives.class.php and find the following code:

The code is as follows:

$this- > PreNext ['pre'] = "previous post: {$preRow [' title']}"

Replace with the following code:

The code is as follows:

$this- > PreNext ['pre'] = "$mlink"; $this- > PreNext [' next'] = "next article: {$nextRow ['title']}"

In this way, the php code can be modified and saved, and then we call it with js in the content page. put the following code:

The code is as follows:

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;}

Add it to the previous position. in this way, all the changes have been made, and then we update the document to see the effect.

Thank you for reading! About dedecms press the keyboard key to achieve page turning method to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Tags: Code function direction keyboard content previous method picture picture station finished novel more help good practical OK next location interest effect Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Microsoft macOS Shulou Technology Huawei