点击文章中图片查看下一页或下一篇

点击图片进入下一页,js代码:

//添加文章中的图片链接
function addImgLink(divID) {
var msgarea = getbyid(divID);
if(msgarea) {
var imgs = msgarea.getElementsByTagName('img');
for (i=0; i
if (imgs[i].parentNode.tagName.toLowerCase() != 'a') {
imgs[i].title = '点击图片进入下一页';
imgs[i].style.cursor = 'pointer';
imgs[i].onclick = function() { window.open('这里定义下一页的URL地址'); }
}
}
}
}

转载请注明出处:https://www.onexin.net/click-the-picture-to-see-the-next-article-or-the-next-one/

随机文章:

1、Supesite模板制作官方视频教程
https://www.onexin.net/supesite-templates-to-create-the-official-video-tutorials/

2、shell命令大全最新更新
https://www.onexin.net/shell-command-daquan-latest-update/

3、随机变换背景图象
https://www.onexin.net/randomly-change-background-image/

4、Discuz! X3.4网站安全配置指引
https://www.onexin.net/discuz-x3-4-safe-guide/

5、让PHP开发者事半功倍的十大技巧
https://www.onexin.net/allow-php-developers-multiplier-ten-tips/

Leave a Reply