<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

Dedecms怎么实现键盘翻页的功能

时间:2020-12-10

大家一定发现了在浏览很多小说、图片网站的时候,我们只要动一动键盘就可以翻译,而并不是要用鼠标去点击下一页,智能化是互联网发展的必然趋势!所以也是我们站长们必须掌握的一门技术。当然,作为当前主流模板程序的dedecms必然也有这方面的功能!那么现在就来和大家说一说dedecms怎么实现键盘翻页的功能!

首先我们打开 include文件夹中的arc.archives.class.php
找到下面的代码:

1 $this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";

替换成以下代码:
 

1 $this->PreNext['pre'] = "$mlink ";
2 $this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";
 

这样php代码就修改好了,保存一下,接下来我们在内容页用js进行调用.将下面的代码:

01 <script type="text/javascript" language="javascript">
02 <!--
03 document.onkeydown=nextpage;
04 var prevpage='{dede:prenext get='pre'/}';
05 var nextpage='{dede:prenext get='next'/}';
06 var index_page = "index.html";
07
0