Home > Web Front-end > JS Tutorial > body text

A smart extra-long article pagination JS_javascript technique compatible with FF

WBOY
Release: 2016-05-16 19:10:54
Original
983 people have browsed it

This is found online and is not displayed in FF.
Idea: Store the article segments into an array based on p, div, table, and then loop to determine whether the length of the displayed content exceeds the defined number of characters displayed per page, and does not exceed Add the contents of the next array until the condition is not met.


[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]
Why is it better after removing with(this)? What is the function of with()?

======================== =====Slim dividing line============================

Idea: According to p, div, table Store the article in segments into an array, and then loop to determine whether the length of the displayed content exceeds the defined number of characters displayed per page, and does not exceed the content of the next array, until the conditions are not met.

I haven’t found it yet. It’s such a big bug. If any expert finds it, please help me change it. Thanks in advance

The modified code is in the paging that I modified in
. It can automatically identify p, div, and table according to the paragraph. Pagination, basically smart pagination.
The little girl is not very familiar with the rules, so she hit me if she wrote the wrong form.

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
改了一下,ie下没有p也可以分页了.不过ff出错了,回家继续改.
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template