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

点击图片进入下一页,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、PHP clearstatcache() 函数
https://www.onexin.net/php-clearstatcache-function/

2、5款纯div+css制作的弹出菜单(标准且无js)
https://www.onexin.net/pure-div-css-crafted-pop-up-menu-standard-and-non-js/

3、WP_Query函数在WordPress中的运用
https://www.onexin.net/wp_query-function-in-the-use-of-wordpress/

4、Magento 1.6.0.0-alpha1 阿尔法版来了
https://www.onexin.net/magento-1-6-0-0-alpha1-alpha-version-here/

5、[个人潜能6A]成功的条件:习惯的力量
https://www.onexin.net/personal-potentials-6a-the-conditions-for-success-the-power-of-habit/

Leave a Reply