CN104298506A - Achievement method for webpage paging plug-in - Google Patents

Achievement method for webpage paging plug-in Download PDF

Info

Publication number
CN104298506A
CN104298506A CN201410495603.3A CN201410495603A CN104298506A CN 104298506 A CN104298506 A CN 104298506A CN 201410495603 A CN201410495603 A CN 201410495603A CN 104298506 A CN104298506 A CN 104298506A
Authority
CN
China
Prior art keywords
page
plug
unit
parameter
paging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410495603.3A
Other languages
Chinese (zh)
Inventor
杨育斌
柯宗贵
林再贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Blue Shield Information Security Technology Co Ltd
Bluedon Information Security Technologies Co Ltd
Original Assignee
Blue Shield Information Security Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Blue Shield Information Security Technology Co Ltd filed Critical Blue Shield Information Security Technology Co Ltd
Priority to CN201410495603.3A priority Critical patent/CN104298506A/en
Publication of CN104298506A publication Critical patent/CN104298506A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses an achievement method for a webpage paging plug-in. A label is defined, a json object is configured, JavaScript code carrying out corresponding rendering according to parameters is compiled, an external call function is exposed and is called to transmit related parameters, html elements of the paging plug-in are rendered according to the parameters, event binding is carried out, and after an event is triggered, parameters of the current page are modified, and the external function is called again. By means of the technical scheme, the plug-in package is carried out on the paging function, the paging function can be achieved only through an extremely small number of codes, the number of the codes is small, the style is uniform, and expandability is high.

Description

A kind of implementation method of webpage paging plug-in unit
Technical field
The present invention relates to computer software technical field, particularly relate to a kind of implementation method of webpage paging plug-in unit.
Background technology
At the development along with production informatization and networking, the system addresses based on B/S framework and is applied to industry-by-industry more and more widely without installing, distributing the feature such as easy, therefore to the security of this class method and the requirement of dirigibility also more and more higher.Traditional Web client authority control method mainly takes the user conversation to preserving in the session of website to read, then according to the difference of user types, the page shows different web page elements and function, thus reaches the effect realizing giving different user different rights.This mode needs the logical code different programs is a large amount of to control authority, extendability is extremely not easy, and workload is also relatively large.
Application number is a kind of generation method that the application for a patent for invention of CN201210062253.2 discloses data page plug-in unit, the generation method of its data page plug-in unit developed in page development plug-in unit JQUERY plug-in unit mode, support the operation such as submitting after the single choice of data, multiselect, printing, input data rows, batch modification data to, can easily according to self-defining look & feel Pagination Display data, decrease code development quantity, convenient expansion and use, improve development efficiency, and improve the display speed of interface data, reduce the pressure to server.But this technology is carry out encapsulation plug-in unit in a tabular form completely, and the paging for non-form data is inapplicable.
Summary of the invention
The object of the invention is the defect in order to overcome prior art, a kind of implementation method of webpage paging plug-in unit is provided, two-page separation function is carried out plug-in unit encapsulation by the method, make only to need few code to realize when needing two-page separation function, and style is more unified, expansion is more flexible, and its specific implementation flow process is as follows:
S1. the div label that comprises id attribute is defined;
S2. a configuration json object is defined, configuration parameter;
S3. html element is write and carry out according to all parameters the javascript code that correspondence plays up process, and a final exposure external call function;
S4. perform calling the paging plug-in unit external call function formed in s3, and transmit the correlation parameter defined in s1, the parameter do not transmitted then adopts built-in default value;
S5. the html element of paging plug-in unit is played up according to parameter;
S6. event binding, when triggering click event, then revises current page parameter, and again arrives s4 and carry out re invocation and play up.
Wherein, the label in s1 can also be the range tag comprising other labels, such as span label, li label.
In s2, configuration parameter comprises corresponding web page element id, current page, total page number, page number quantity, Style Attributes, event.
The html element playing up paging plug-in unit in s5 comprises: add page up, lower one page, homepage, last page, and according to number of pages, current page, total page number, page number redirect link is added in intelligent circulation.
The beneficial effect that technical solution of the present invention is brought:
Two-page separation function is carried out plug-in unit encapsulation by technical solution of the present invention, and making only needs few code to realize when needing two-page separation function, and size of code is few, and style is unified, and extendability is strong.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is method flow diagram of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Main innovate point of the present invention is two-page separation function to carry out plug-in unit encapsulation, make only to need when needing two-page separation function few code to realize, and style is more unified, expands more flexible.Be illustrated in figure 1 method flow diagram of the present invention, its concrete implementation step is as follows:
1. defining the div label that comprises id attribute, also can be the range tag that can comprise other labels, as span label, li label etc.
2. define a configuration json object, the corresponding web page element id, current page, total page number, page number quantity, Style Attributes, event etc. of configuration parameter.
3. pair html element is write and is carried out according to all parameters the javascript code that correspondence plays up process, and a final exposure external call function.
4. perform calling the paging plug-in unit external call function formed in 3, and transmit the correlation parameter defined in 1, the parameter do not transmitted then adopts built-in default value.
5. play up the html element of paging plug-in unit according to parameter: add page up, lower one page, homepage, last page, and according to number of pages, current page, total page number, page number redirect link is added in intelligent circulation.
6. event binding, when triggering click event, then revises current page parameter, and again carries out re invocation to the 4th step and play up.
Above the implementation method of a kind of webpage paging plug-in unit that the embodiment of the present invention provides is described in detail, apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (4)

1. an implementation method for webpage paging plug-in unit, is characterized in that, two-page separation function is carried out plug-in unit encapsulation by the method, make only to need few code to realize when needing two-page separation function, and style is more unified, expansion is more flexible, and its specific implementation flow process is as follows:
S1. the div label that comprises id attribute is defined;
S2. a configuration json object is defined, configuration parameter;
S3. html element is write and carry out according to all parameters the javascript code that correspondence plays up process, and a final exposure external call function;
S4. perform calling the paging plug-in unit external call function formed in s3, and transmit the correlation parameter defined in s1, the parameter do not transmitted then adopts built-in default value;
S5. the html element of paging plug-in unit is played up according to parameter;
S6. event binding, when triggering click event, then revises current page parameter, and again arrives s4 and carry out re invocation and play up.
2. method according to claim 1, is characterized in that, the label in s1 can also be the range tag comprising other labels, such as span label, li label.
3. method according to claim 1, is characterized in that, the configuration parameter in s2 comprises corresponding web page element id, current page, total page number, page number quantity, Style Attributes, event.
4. method according to claim 1, is characterized in that, the html element playing up paging plug-in unit in s5 comprises: add page up, lower one page, homepage, last page, and according to number of pages, current page, total page number, page number redirect link is added in intelligent circulation.
CN201410495603.3A 2014-09-24 2014-09-24 Achievement method for webpage paging plug-in Pending CN104298506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410495603.3A CN104298506A (en) 2014-09-24 2014-09-24 Achievement method for webpage paging plug-in

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410495603.3A CN104298506A (en) 2014-09-24 2014-09-24 Achievement method for webpage paging plug-in

Publications (1)

Publication Number Publication Date
CN104298506A true CN104298506A (en) 2015-01-21

Family

ID=52318249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410495603.3A Pending CN104298506A (en) 2014-09-24 2014-09-24 Achievement method for webpage paging plug-in

Country Status (1)

Country Link
CN (1) CN104298506A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068833A (en) * 2015-07-31 2015-11-18 南威软件股份有限公司 Plug-in form based method for carrying out rapid transfer of BS system in page tab mode
CN105550000A (en) * 2015-12-22 2016-05-04 金蝶软件(中国)有限公司 Generation method and system of mobile terminal sliding plugin
CN107391158A (en) * 2017-08-02 2017-11-24 郑州云海信息技术有限公司 A kind of method and apparatus that form drafting is realized based on iDataTable encapsulation
CN108628610A (en) * 2018-05-11 2018-10-09 国云科技股份有限公司 A kind of webpage content display system based on data-driven

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662654A (en) * 2012-03-09 2012-09-12 北京神州数码思特奇信息技术股份有限公司 Method for generation of data paging plug-in

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662654A (en) * 2012-03-09 2012-09-12 北京神州数码思特奇信息技术股份有限公司 Method for generation of data paging plug-in

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姚瑜 等: ""基于JQuery对开源插件jgGrid的功能应用"", 《电脑编程技巧与维护》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068833A (en) * 2015-07-31 2015-11-18 南威软件股份有限公司 Plug-in form based method for carrying out rapid transfer of BS system in page tab mode
CN105068833B (en) * 2015-07-31 2017-12-22 南威软件股份有限公司 The method of BS system tab pattern fast transferrings based on card format
CN105550000A (en) * 2015-12-22 2016-05-04 金蝶软件(中国)有限公司 Generation method and system of mobile terminal sliding plugin
CN105550000B (en) * 2015-12-22 2019-03-01 金蝶软件(中国)有限公司 A kind of generation method and system of mobile terminal slide-insert
CN107391158A (en) * 2017-08-02 2017-11-24 郑州云海信息技术有限公司 A kind of method and apparatus that form drafting is realized based on iDataTable encapsulation
CN107391158B (en) * 2017-08-02 2020-12-01 苏州浪潮智能科技有限公司 Method and equipment for realizing table drawing based on iDataTable packaging
CN108628610A (en) * 2018-05-11 2018-10-09 国云科技股份有限公司 A kind of webpage content display system based on data-driven

Similar Documents

Publication Publication Date Title
CN110691136B (en) Data interaction method and device, electronic equipment and storage medium
US10614155B2 (en) Single page application authoring in a content management system
CN105446740A (en) MVVM (Model-View-View Model) architecture based Web front-end presentation system
CN104461484B (en) The implementation method and device of front-end template
CN104298506A (en) Achievement method for webpage paging plug-in
US9646103B2 (en) Client-side template engine and method for constructing a nested DOM module for a website
CN101551819A (en) A method for rendering large-scale Web page
CN103838576A (en) Website establishing method and device
CN109918175A (en) Picture Generation Method, device, storage medium and electronic equipment
US20160012144A1 (en) Javascript-based, client-side template driver system
US20160012147A1 (en) Asynchronous Initialization of Document Object Model (DOM) Modules
CN103179166A (en) Method of providing service in client and the client
CN104331315B (en) A kind of parsing of arbitrary levels json objects and generation method and system
CN102663050B (en) Method and device for processing electronic book data
US20240007701A1 (en) Continuing video playback when switching from a dynamic page to a non-dynamic page
CN112084446A (en) Webpage editing method, editor, electronic equipment and readable storage medium
CN104462160B (en) Edit the method and system of formula
US10747943B2 (en) Method, device, client apparatus, and electronic device for presenting webpages
CN110543307A (en) application construction method and device
CN105867984A (en) Method, device and client for displaying task state in web page as well as mobile equipment
CN104102485A (en) Html-based module encapsulation loading method
US10218767B2 (en) Method, system and browser for executing active object of browser
CN103197922A (en) Technical method for developing (WEB) dynamic script by HTML (hypertext markup language)
TW201443666A (en) System and method for displaying three-dimensional image
CN103207748B (en) Method and the browser of response is realized based on browser extension

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150121