javascript - A tag jump problem
伊谢尔伦
伊谢尔伦 2017-06-12 09:30:30
0
3
627

<a href="javascript:void(0);" id="next" class="btn-red">next page</a>
on the page There is a toolbar with a "Next Page" button. Clicking this button will refresh the next page of information.
Below I find the next related parts in js:

next:function(n){return ir(n,"nextSibling")}
function ir(n,t){do n=n[t];while(n&&n.nodeType!==1);return n}

But based on this information, I still can't know how the page is calculated after clicking "Next Page". Can anyone help me analyze it? I just started JavaScript and only understand the basic syntax.
Attached is the web address: http://www.ikanman.com/comic/...
is the toolbar on the page.

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
迷茫

The code you are looking for is just the next method of jQuery and has nothing to do with turning to the next page.
What you are looking for is this sentence:
$("#next").click(function(){SMH.next()})

typecho

Isn’t it just switching a picture? Click to switch the src address of the image tag to point to, and it will be fine

黄舟

The code you uploaded is from jquery.min.js. Next is to operate the next sibling node. You need to encapsulate an event yourself and bind it to the a element

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!