首先是修改源文件 打开include里的arc.archives.class.php(用来解析生成文档的)
查找
$this->PreNext['pre'] = "上一篇:<a rel="nofollow noopener noreferrer" href='$mlink'>{$preRow['title']}</a> "; |
修改成 $this->PreNext['pre'] = "$mlink "; $this->PreNext['next'] = "下一篇:<a rel="nofollow noopener noreferrer" href='$mlink'>{$nextRow['title']}</a> "; 修改成 $this->PreNext['next'] = "$mlink "; 这样就可以了 {$preRow['title']} 上一篇的标题 {$nextRow['title']} 下一篇的标题 $mlink 对应的链接地址 下面是文章模板页面调用参数:
<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) { event = 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!='上一篇:没有了 ') location=prevpage; else alert('这是第一页'); } if (event.keyCode==39) { if (nextpage!='' && nextpage!='下一篇:没有了 ') location=nextpage; else alert('已经是最后一页了'); } } //--> 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> |
以上就是织梦文章页上下篇如何实现如何利用键盘左右翻页。这一路,很累很累,满身伤痕,懂得了谁才是你要珍惜的人,有些人注定是路人。更多关于织梦文章页上下篇如何实现如何利用键盘左右翻页请关注haodaima.com其它相关文章!