CN107220351A - The page is left white width calculation method, device, storage medium and electronic equipment - Google Patents

The page is left white width calculation method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN107220351A
CN107220351A CN201710398454.2A CN201710398454A CN107220351A CN 107220351 A CN107220351 A CN 107220351A CN 201710398454 A CN201710398454 A CN 201710398454A CN 107220351 A CN107220351 A CN 107220351A
Authority
CN
China
Prior art keywords
page
daughter element
left white
direct
daughter
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.)
Granted
Application number
CN201710398454.2A
Other languages
Chinese (zh)
Other versions
CN107220351B (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710398454.2A priority Critical patent/CN107220351B/en
Publication of CN107220351A publication Critical patent/CN107220351A/en
Application granted granted Critical
Publication of CN107220351B publication Critical patent/CN107220351B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Width calculation method, device and storage medium and electronic equipment are left white the disclosure is directed to a kind of page.This method includes:After the completion of Webpage loading, the multiple first direct daughter elements in the property parameters body labels of the page are obtained;Remove the default daughter element in the multiple first direct daughter element and form the remaining second direct daughter element;Compare the height of each daughter element in the remaining second direct daughter element to determine height highest daughter element;The main view graph region of the page is determined according to the height highest daughter element and the page described in the positional information calculation of the main view graph region is left white width.What the disclosure dynamically can accurately calculate the page is left white width, applied widely with versatility.

Description

The page is left white width calculation method, device, storage medium and electronic equipment
Technical field
This disclosure relates to which field of computer technology, more particularly to a kind of Webpage are left white width calculation method, the page and stayed White width calculation device and realize that the page is left white the computer-readable recording medium and electronic equipment of width calculation method.
Background technology
It is placed in the middle generally by front view in browsing device net page design, and in front view both sides to browser border then according to clear Device window size of looking at distributes white space, and the white space is referred to as being left white.It is left white system of the calculating to webpage click position of width Meter such as has large effect based on the statistics for clicking on thermodynamic chart, especially in the response type page, influences even more serious.For example certain Site home page is left white width when browser window is maximized under 1920*1080 resolution ratio be 355 pixels, the seat of search button It is designated as 1180x140;And width is left white when browser window is maximized under 1600*900 resolution ratio for 195 pixels, search is pressed The coordinate of button is 1020x140, it can be seen that the coordinate of same search button has very big difference in the case of both the above.It is above-mentioned Factor can cause there is larger error in the click thermodynamic chart drafting of the page, have a great impact to drawing click thermodynamic chart. Therefore how accurately to calculate page-out is left white width, there is critically important influence to page statistical analysis.
In correlation technique, the common approach that above technical problem is solved at present is:According to CSS CSS (Cascading Style Sheets) inquires about to draw front view width, is then calculated again by window width and is left white width Spend, calculation formula is:It is left white width=(window width-front view width)/2.Or, in the specific of known front view root element Webpage, directly obtains the root element of front view, width is left white using the abscissa of the root element of front view as the page.But with Upper scheme still be present, for example, CSS inquiries are changes within the specific limits, such as browser window width is small When 768 pixel, front view width is the first numerical value, and browser window width is when being more than 768 pixels and being less than 1024 pixel, main View width is the second value different from the first numerical value.As can be seen here, in this way calculate be left white width exist it is larger Error, it is not accurate enough.In addition, in the particular webpage of known front view root element, directly obtaining the horizontal seat of the root element of front view It is denoted as to be left white width, this mode does not obviously have versatility, and the scope of application is small.
Therefore, it is necessary to which providing a kind of new technical scheme improves one or more problem present in such scheme.
It should be noted that information is only used for strengthening the reason of background of this disclosure disclosed in above-mentioned background section Solution, therefore can include not constituting the information to prior art known to persons of ordinary skill in the art.
The content of the invention
The purpose of the disclosure, which is to provide a kind of page, to be left white width calculation method, the page and is left white width calculation device and reality The existing page is left white the computer-readable recording medium and electronic equipment of width calculation method, and then at least to a certain extent Overcome one or more problem caused by limitation and the defect due to correlation technique.
Other characteristics and advantage of the disclosure will be apparent from by following detailed description, or partially by the disclosure Practice and acquistion.
Width calculation method is left white there is provided a kind of page according to the first aspect of the embodiment of the present disclosure, this method includes:
After the completion of Webpage loading, the multiple first direct sons in the property parameters body labels of the page are obtained Element;
Remove the default daughter element in the multiple first direct daughter element and form the remaining second direct daughter element;
Compare the height of each daughter element in the remaining second direct daughter element to determine height highest son member Element;
The main view graph region of the page is determined and with the position of the main view graph region according to the height highest daughter element What confidence breath calculated the page is left white width.
In a kind of exemplary embodiment of the disclosure, methods described also includes:
The width that is left white for calculating the obtained page is stored in the js variables of the page.
In a kind of exemplary embodiment of the disclosure, the default daughter element includes son member of the align_type for absolute fix Element;
The default daughter element removed in the multiple first direct daughter element and form the remaining second direct son member Element includes:
All daughter elements in the multiple first direct daughter element are traveled through, to remove the multiple first direct daughter element Middle align_type forms the remaining second direct daughter element for the daughter element of absolute fix.
In a kind of exemplary embodiment of the disclosure, every height in the comparison remaining second direct daughter element The height of element is to determine that height highest daughter element includes:
All daughter elements in the remaining second direct daughter element are traveled through to obtain the height of each daughter element, are compared The height of each daughter element is to determine the height highest daughter element.
It is multiple in the property parameters body labels for obtaining the page in a kind of exemplary embodiment of the disclosure First direct daughter element includes:
The multiple first direct daughter elements in the property parameters body labels of the page are obtained by presetting method function.
In a kind of exemplary embodiment of the disclosure, methods described also includes:
Begin listening for whether the page occurs predeterminable event when the page is loaded and completed;Wherein, the default thing Part changes to terminal resolution ratio or the window size change of the page is related;
When listening to the generation predeterminable event, that recalculates the page is left white width.
In a kind of exemplary embodiment of the disclosure, the page is the response type page.
Width calculation device is left white there is provided a kind of page according to the second aspect of the embodiment of the present disclosure, the device includes:
Element acquisition module, after the completion of being loaded in Webpage, obtains the property parameters body labels of the page In the multiple first direct daughter elements;
Element removes module, forms remaining for removing the default daughter element in the multiple first direct daughter element Second direct daughter element;
Element determining module, for comparing the height of each daughter element in the remaining second direct daughter element with true Determine height highest daughter element;And
Width calculation module, for determined according to the height highest daughter element page main view graph region and with The page is left white width described in the positional information calculation of the main view graph region.
According to the third aspect of the embodiment of the present disclosure there is provided a kind of computer-readable recording medium, calculating is stored thereon with Machine program, the program realizes that the page is left white width calculation method described in any one above-mentioned embodiment when being executed by processor Step.
According to the fourth aspect of the embodiment of the present disclosure there is provided a kind of electronic equipment, including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to perform in any one above-mentioned embodiment via the executable instruction is performed The step of page is left white width calculation method.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In a kind of embodiment of the disclosure, width calculation method and device is left white by the above-mentioned page, the page is obtained first Property parameters body labels in multiple direct daughter elements, and remove the default daughter element in the multiple direct daughter element and Remaining direct daughter element is formed, secondly compares the height of each daughter element in remaining direct daughter element to determine height most High daughter element, the main view graph region of the page is determined and with the main view graph region finally according to height highest daughter element The page described in positional information calculation is left white width.Thus it is possible, on the one hand, due to removing the default son member in multiple direct daughter elements Element, and the height based on element determines the main view graph region of the page, so calculate the page be left white width so that result of calculation is missed Difference is small, is left white width calculation more accurate;On the other hand, because the direct daughter element in the body labels according to Webpage is entered Row processing, rather than handled using CSS modes, processing mode has versatility, reduces the terminal device of operation webpage to meter The influence of result is calculated, it is applied widely.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the disclosure Example, and be used to together with specification to explain the principle of the disclosure.It should be evident that drawings in the following description are only the disclosure Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 schematically shows the page in disclosure exemplary embodiment and is left white width calculation method flow diagram;
Fig. 2 schematically shows another page in disclosure exemplary embodiment and is left white width calculation method flow diagram;
Fig. 3 schematically shows the another page in disclosure exemplary embodiment and is left white width calculation method flow diagram;
Fig. 4 schematically shows a web page layout schematic diagram in disclosure exemplary embodiment;
Fig. 5 schematically shows the page in disclosure exemplary embodiment and is left white width calculation schematic device;
Fig. 6 schematically shows a kind of computer-readable recording medium schematic diagram in disclosure exemplary embodiment;
Fig. 7 schematically shows electronic equipment schematic diagram in disclosure exemplary embodiment.
Embodiment
Example embodiment is described more fully with referring now to accompanying drawing.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will more Fully and completely, and by the design of example embodiment those skilled in the art is comprehensively conveyed to.Described feature, knot Structure or characteristic can be combined in one or more embodiments in any suitable manner.
In addition, accompanying drawing is only the schematic illustrations of the disclosure, it is not necessarily drawn to scale.Identical accompanying drawing mark in figure Note represents same or similar part, thus will omit repetition thereof.Some block diagrams shown in accompanying drawing are work( Can entity, not necessarily must be corresponding with physically or logically independent entity.These work(can be realized using software form Can entity, or realize in one or more hardware modules or integrated circuit these functional entitys, or at heterogeneous networks and/or place These functional entitys are realized in reason device device and/or microcontroller device.
A kind of page is provide firstly in this example embodiment and is left white width calculation method.This method can apply to one On terminal device, such as mobile phone, personal computer or server.With reference to shown in Fig. 1, this method can include following step Suddenly:
Step S101:After the completion of Webpage loading, obtain multiple in the property parameters body labels of the page First direct daughter element.
Step S102:Remove the default daughter element in the multiple first direct daughter element and to form remaining second direct Daughter element.
Step S103:Compare the height of each daughter element in the remaining second direct daughter element to determine height most High daughter element.
Step S104:The main view graph region of the page is determined and with the front view according to the height highest daughter element The page is left white width described in the positional information calculation in region.
Width calculation method is left white by the above-mentioned page, on the one hand, due to removing the default son in multiple direct daughter elements Element, and the height based on element determines the main view graph region of the page, so calculate the page be left white width so that result of calculation Error is small, is left white width calculation more accurate;On the other hand, due to the direct daughter element in the body labels according to Webpage Handled, rather than handled using CSS modes, processing mode has versatility, reduce the terminal device pair of operation webpage The influence of result of calculation, it is applied widely.
Below, each step of the above method in this example embodiment will be carried out referring to figs. 1 to Fig. 4 more detailed Explanation.
In step S101, after the completion of Webpage loading, in the property parameters body labels for obtaining the page Multiple first direct daughter elements.
Exemplary, browser is for example opened on a personal computer, and input network address loading completes to enter a Webpage Afterwards, computer obtains the multiple first direct daughter elements in the property parameters body labels of the Webpage.Need exist for explanation , it is the direct daughter element for obtaining body labels in this example embodiment, without including the daughter element in body labels Daughter element.For example, the direct daughter element list in the property parameters body labels of the page can be obtained.
In a kind of exemplary embodiment of the disclosure, the property parameters body of the page is obtained described in step S101 The multiple first direct daughter elements in label can include in the following manner, i.e., the category of the page is obtained by presetting method function The multiple first direct daughter elements in property parameter body labels.The presetting method function can be commonly used in the art for obtaining It the method function of body label sub-elements is taken, can so improve acquisition speed, and then can rapidly calculated for subsequent in time It is left white width.
In step s 102, remove the default daughter element in the multiple first direct daughter element and form remaining second Direct daughter element.
Exemplary, in a kind of exemplary embodiment of the disclosure, the default daughter element can include but is not limited to Align_type is the daughter element of absolute fix.Accordingly, removed described in step S102 in the multiple first direct daughter element Default daughter element and in the following manner can be included by forming the remaining second direct daughter element:Travel through the multiple first directly sub All daughter elements in element, using remove align_type in the multiple first direct daughter element as the daughter element of absolute fix and Form the remaining second direct daughter element.
For example, the direct daughter element list in the property parameters body labels of the page is obtained in step S101 Afterwards, processing is identified to the direct daughter element in the direct daughter element list, to determine son of the align_type as absolute fix Element simultaneously removes align_type in the direct daughter element list and forms described remaining second for the daughter element of absolute fix Direct daughter element.By excluding the daughter element that align_type is absolute fix, it can exclude on the left of the page or right side sidebar Or the situation of menu bar so that finally calculate to be left white width more accurate.
In step s 103, compare the height of each daughter element in the remaining second direct daughter element to determine height Spend highest daughter element.
It is exemplary, described remaining the is compared in a kind of exemplary embodiment of the disclosure, described in step S103 The height of each daughter element in two direct daughter elements is to determine that height highest daughter element can include but is not limited to lower section Formula:All daughter elements in the remaining second direct daughter element are traveled through to obtain the height of each daughter element, it is relatively more each The height of daughter element is to determine the height highest daughter element.By comparing daughter element height, height highest is got Node element, can exclude the situation that page top margin or page footing are laterally paved with, further such that what is finally calculated is left white width It is more accurate.
In step S104, the main view graph region of the page is determined and with the master according to the height highest daughter element The page is left white width described in the positional information calculation of view area.
Exemplary, the main view of the page can be determined according to the page area belonging to the height highest daughter element Graph region, and width is left white with the page described in the positional information calculation of the main view graph region, for example can be according to the front view The overall width of the abscissa value in region and the page calculate obtain page left and right sides white space be left white width.
, for example can be according to being determined the page area belonging to the height highest daughter element with reference to shown in Fig. 4 The main view graph region 420 of the page, and institute is obtained with the overall width D3 calculating of the abscissa value of the main view graph region 420 and the page That states page left and right sides white space 410 is left white width D 1 and D2, and usual D1 and D2 are equal but are also not necessarily limited to this.
In order to adapt to the dynamic change (such as window size change) of the browsing device net page page and being left white for the dynamic access page Width.With reference to shown in Fig. 2, in a kind of exemplary embodiment of the disclosure, the shown page is left white width in the above-described embodiments Spend on the basis of computational methods, methods described can also comprise the following steps:
Step S201:Begin listening for whether the page occurs predeterminable event when the page is loaded and completed;Wherein, institute State predeterminable event related to terminal resolution ratio change or the window size change of the page.
In the present exemplary embodiment, the page is the response type page, and the present embodiment can the compatible response type page.It is described Predeterminable event can be as change page window size mouse click event or adjust terminal screen resolution triggering thing Part.When the window size for running the screen resolution of terminal such as personal computer of browser page or browser changes, What the present embodiment can timely respond to recalculate the page after changing is left white width.The present embodiment is adapted to various resolution ratio And window size, it is applied widely with versatility.
Step S202:When listening to the generation predeterminable event, that recalculates the page is left white width.
Exemplary, when listening to the generation predeterminable event such as page window size change event, re-execute institute State step S101~S104 with recalculate change after the page be left white width.
The present embodiment, which can monitor such as browser window size variation and timely respond to the dynamic calculation page, is left white width, from And can timely and accurately calculate obtain the page be left white width.
With reference to shown in Fig. 3, in a kind of exemplary embodiment of the disclosure, methods described can also include following step Suddenly:
Step S105:The width that is left white for calculating the obtained page is stored in the js variables of the page.So, Relative coordinate of the element in page front view can easily be calculated based on the width that is left white of the known page, and then caused The error for drawing heating power click figure by the relative coordinate in front view can be substantially reduced, beneficial to the statistical to Webpage Analysis.
It should be noted that although each step of method in the disclosure is described with particular order in the accompanying drawings, This does not require that or implied must perform these steps according to the particular order, or have to carry out the step shown in whole Desired result could be realized.It is additional or alternative, it is convenient to omit some steps, multiple steps are merged into a step and held OK, and/or by a step execution of multiple steps etc. are decomposed into.In addition, being also easy to understand, these steps can be For example either synchronously or asynchronously performed in multiple module/process/threads.
Further, in this example embodiment, additionally provide a kind of page and be left white width calculation device.With reference in Fig. 5 Shown, device 100 can include element acquisition module 101, element and remove module 102, element determining module 103 and width calculation Module 104.Wherein:
The element acquisition module 101, after the completion of being loaded in Webpage, obtains the property parameters of the page The multiple first direct daughter elements in body labels.
The element removes module 102, for removing the default daughter element in the multiple first direct daughter element and shape Into the remaining second direct daughter element.
The element determining module 103, for comparing each daughter element in the remaining second direct daughter element Height is to determine height highest daughter element.
The width calculation module 104, the front view for determining the page according to the height highest daughter element Region is simultaneously left white width with the page described in the positional information calculation of the main view graph region.
In a kind of exemplary embodiment of the disclosure, described device 100 can also include data storage module, and (figure is not Show), for the width that is left white for calculating the obtained page to be stored in the js variables of the page.
In a kind of exemplary embodiment of the disclosure, the default daughter element includes the son that align_type is absolute fix Element.Accordingly, the element removes all son members that module 102 can be used in the multiple first direct daughter element of traversal Element, described remaining is formed to remove align_type in the multiple first direct daughter element as the daughter element of absolute fix Two direct daughter elements.
In a kind of exemplary embodiment of the disclosure, the element determining module 103 can be used for traveling through the residue The second direct daughter element in all daughter elements to obtain the height of each daughter element, the height of relatively more each daughter element is with true The fixed height highest daughter element.
In a kind of exemplary embodiment of the disclosure, the element acquisition module 101 can be used for by presetting method Function obtains the multiple first direct daughter elements in the property parameters body labels of the page.
In a kind of exemplary embodiment of the disclosure, described device can also include action listener module (not shown), For beginning listening for whether the page occurs predeterminable event when the page is loaded and completed;Wherein, the predeterminable event with Terminal resolution ratio changes or the window size of the page changes related;When listening to the generation predeterminable event, again Calculate the page is left white width.
In a kind of exemplary embodiment of the disclosure, the page is the response type page.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Although it should be noted that being referred to some modules or list of the equipment for action executing in above-detailed Member, but this division is not enforceable.In fact, according to embodiment of the present disclosure, it is above-described two or more Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be further divided into being embodied by multiple modules or unit.It is used as module or list The part of member display can be or may not be physical location, you can with positioned at a place, or can also be distributed to On multiple NEs.Some or all of module therein can be selected according to the actual needs to realize the open scheme of wood Purpose.Those of ordinary skill in the art are without creative efforts, you can to understand and implement.
In an exemplary embodiment of the disclosure, a kind of computer-readable recording medium is additionally provided, meter is stored thereon with Calculation machine program, can realize that the page is left white width described in any one above-mentioned embodiment when the program is by such as computing device The step of computational methods.In some possible embodiments, various aspects of the invention are also implemented as a kind of program production The form of product, it includes program code, when described program product is run on the terminal device, and described program code is used to make institute State terminal device perform the above-mentioned page of this specification be left white described in width calculation method part according to various examples of the invention The step of property embodiment.
With reference to shown in Fig. 6, describe according to the embodiment of the present invention be used for realize that the above-mentioned page is left white width calculation The program product 300 of method, it can use portable compact disc read only memory (CD-ROM) and including program code, and can To be run on terminal device, such as PC.However, the program product not limited to this of the present invention, in this document, readable Storage medium can be it is any include or storage program tangible medium, the program can be commanded execution system, device or Device is used or in connection.
Described program product can use any combination of one or more computer-readable recording mediums.Computer-readable recording medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any combination above.The more specifically example of readable storage medium storing program for executing is (non exhaustive List) include:It is electrical connection, portable disc, hard disk, random access memory (RAM) with one or more wires, read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer-readable recording medium can include believing in a base band or as the data of carrier wave part propagation Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any beyond readable storage medium storing program for executing Computer-readable recording medium, the readable storage medium storing program for executing can be sent, propagated or be transmitted for being made by instruction execution system, device or device With or program in connection.The program code included on readable storage medium storing program for executing can be passed with any appropriate medium It is defeated, including but not limited to wireless, wired, optical cable, RF etc., or above-mentioned any appropriate combination.
It can be write with any combination of one or more programming languages for performing the program that the present invention is operated Code, described program design language includes object oriented program language-Java, C++ etc., in addition to conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user Perform, partly perform on a user device on computing device, being performed as an independent software kit, partly in user's calculating Its upper side point is performed or performed completely in remote computing device or server on a remote computing.It is remote being related to In the situation of journey computing device, remote computing device can pass through the network of any kind, including LAN (LAN) or wide area network (WAN) user calculating equipment, is connected to, or, it may be connected to external computing device (for example utilizes ISP Come by Internet connection).
In an exemplary embodiment of the disclosure, a kind of electronic equipment is also provided, the electronic equipment can include processor, And for the memory for the executable instruction for storing the processor.Wherein, the processor is configured to described via performing Executable instruction performs the step of page is left white width calculation method described in any one above-mentioned embodiment.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be implemented as following form, i.e.,:It is complete hardware embodiment, complete Complete Software Implementation (including firmware, microcode etc.), or the embodiment combined in terms of hardware and software, it can unite here Referred to as " circuit ", " module " or " system ".
Electronic equipment 600 according to the embodiment of the invention is described referring to Fig. 7.The electronics that Fig. 7 is shown Equipment 600 is only an example, should not carry out any limitation to the function of the embodiment of the present invention and using range band.
As shown in fig. 7, electronic equipment 600 is showed in the form of universal computing device.The component of electronic equipment 600 can be wrapped Include but be not limited to:At least one processing unit 610, at least one memory cell 620, (including the storage of connection different system component Unit 620 and processing unit 610) bus 630, display unit 640 etc..
Wherein, the memory cell is had program stored therein code, and described program code can be held by the processing unit 610 OK so that the processing unit 610 perform the above-mentioned page of this specification be left white described in width calculation method part according to this The step of inventing various illustrative embodiments.For example, the step of processing unit 610 can be performed as shown in fig. 1.
The memory cell 620 can include the computer-readable recording medium of volatile memory cell form, such as random access memory Unit (RAM) 6201 and/or cache memory unit 6202, can further include read-only memory unit (ROM) 6203.
The memory cell 620 can also include program/practicality work with one group of (at least one) program module 6205 Tool 6204, such program module 6205 includes but is not limited to:Operating system, one or more application program, other programs The realization of network environment is potentially included in each or certain combination in module and routine data, these examples.
Bus 630 can be to represent the one or more in a few class bus structures, including memory cell bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures Local bus.
Electronic equipment 600 can also be with one or more external equipments 700 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, the equipment communication interacted with the electronic equipment 600 can be also enabled a user to one or more, and/or with causing Any equipment (such as router, modulation /demodulation that the electronic equipment 600 can be communicated with one or more of the other computing device Device etc.) communication.This communication can be carried out by input/output (I/O) interface 650.Also, electronic equipment 600 can be with By network adapter 660 and one or more network (such as LAN (LAN), wide area network (WAN) and/or public network, Such as internet) communication.Network adapter 660 can be communicated by bus 630 with other modules of electronic equipment 600.Should Understand, although not shown in the drawings, can combine electronic equipment 600 uses other hardware and/or software module, including but do not limit In:Microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can be realized by software, can also be realized by way of software combines necessary hardware.Therefore, according to the disclosure The technical scheme of embodiment can be embodied in the form of software product, the software product can be stored in one it is non-volatile Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are to cause a calculating Equipment (can be personal computer, server or network equipment etc.) performs the above-mentioned page according to disclosure embodiment It is left white width calculation method.
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by appended Claim is pointed out.

Claims (10)

1. a kind of page is left white width calculation method, it is characterised in that this method includes:
After the completion of Webpage loading, the multiple first directly sons obtained in the property parameters body labels of the page are first Element;
Remove the default daughter element in the multiple first direct daughter element and form the remaining second direct daughter element;
Compare the height of each daughter element in the remaining second direct daughter element to determine height highest daughter element;
The main view graph region of the page is determined according to the height highest daughter element and believed with the position of the main view graph region Cease the calculating page is left white width.
2. the page is left white width calculation method according to claim 1, it is characterised in that methods described also includes:
The width that is left white for calculating the obtained page is stored in the js variables of the page.
3. the page is left white width calculation method according to claim 1, it is characterised in that the default daughter element includes positioning Type is the daughter element of absolute fix;
The default daughter element removed in the multiple first direct daughter element and form the remaining second direct daughter element bag Include:
All daughter elements in the multiple first direct daughter element are traveled through, it is fixed in the multiple first direct daughter element to remove Position type forms the remaining second direct daughter element for the daughter element of absolute fix.
4. the page is left white width calculation method according to claim 3, it is characterised in that the comparison described remaining second The height of each daughter element in direct daughter element is to determine that height highest daughter element includes:
All daughter elements in the remaining second direct daughter element are traveled through to obtain the height of each daughter element, it is relatively more each The height of daughter element is to determine the height highest daughter element.
5. the page is left white width calculation method according to claim 1, it is characterised in that the attribute of the acquisition page The multiple first direct daughter elements in parameter body labels include:
The multiple first direct daughter elements in the property parameters body labels of the page are obtained by presetting method function.
6. width calculation method is left white according to any one of Claims 1 to 5 page, it is characterised in that methods described is also wrapped Include:
Begin listening for whether the page occurs predeterminable event when the page is loaded and completed;Wherein, the predeterminable event with Terminal resolution ratio changes or the window size of the page changes related;
When listening to the generation predeterminable event, that recalculates the page is left white width.
7. the page is left white width calculation method according to claim 6, it is characterised in that the page is the response type page.
8. a kind of page is left white width calculation device, it is characterised in that the device includes:
Element acquisition module, after the completion of being loaded in Webpage, in the property parameters body labels for obtaining the page Multiple first direct daughter elements;
Element removes module, and remaining second is formed for removing the default daughter element in the multiple first direct daughter element Direct daughter element;
Element determining module, for comparing the height of each daughter element in the remaining second direct daughter element to determine height Spend highest daughter element;And
Width calculation module, for determining the main view graph region of the page according to the height highest daughter element and with the master The page is left white width described in the positional information calculation of view area.
9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is held by processor The step of any one of claim 1~7 page is left white width calculation method is realized during row.
10. a kind of electronic equipment, it is characterised in that including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to carry out any one of perform claim requirement 1~7 page via the execution executable instruction The step of face is left white width calculation method.
CN201710398454.2A 2017-05-31 2017-05-31 Page margin width calculation method and device, storage medium and electronic equipment Active CN107220351B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710398454.2A CN107220351B (en) 2017-05-31 2017-05-31 Page margin width calculation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710398454.2A CN107220351B (en) 2017-05-31 2017-05-31 Page margin width calculation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107220351A true CN107220351A (en) 2017-09-29
CN107220351B CN107220351B (en) 2020-09-29

Family

ID=59948153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710398454.2A Active CN107220351B (en) 2017-05-31 2017-05-31 Page margin width calculation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107220351B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109164999A (en) * 2018-08-29 2019-01-08 郑州云海信息技术有限公司 A kind of method, apparatus that table is adaptively shown, equipment and readable storage medium storing program for executing
CN109522497A (en) * 2018-10-25 2019-03-26 北京奇虎科技有限公司 A kind of the adaptation display methods and device of the news web page page
CN111125564A (en) * 2018-11-01 2020-05-08 百度在线网络技术(北京)有限公司 Thermodynamic diagram generation method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908076A (en) * 2010-08-24 2010-12-08 北京世纪高通科技有限公司 Page layout self-adaptive method and device
US20120005565A1 (en) * 2002-11-27 2012-01-05 Microsoft Corporation Small Form Factor Web Browsing
CN103631866A (en) * 2013-11-01 2014-03-12 北京奇虎科技有限公司 Webpage display method and browser
CN103970770A (en) * 2013-01-29 2014-08-06 腾讯科技(深圳)有限公司 Optimization processing method and device for web page and client

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120005565A1 (en) * 2002-11-27 2012-01-05 Microsoft Corporation Small Form Factor Web Browsing
CN101908076A (en) * 2010-08-24 2010-12-08 北京世纪高通科技有限公司 Page layout self-adaptive method and device
CN103970770A (en) * 2013-01-29 2014-08-06 腾讯科技(深圳)有限公司 Optimization processing method and device for web page and client
CN103631866A (en) * 2013-11-01 2014-03-12 北京奇虎科技有限公司 Webpage display method and browser

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109164999A (en) * 2018-08-29 2019-01-08 郑州云海信息技术有限公司 A kind of method, apparatus that table is adaptively shown, equipment and readable storage medium storing program for executing
CN109164999B (en) * 2018-08-29 2022-03-08 郑州云海信息技术有限公司 Form self-adaptive display method, device, equipment and readable storage medium
CN109522497A (en) * 2018-10-25 2019-03-26 北京奇虎科技有限公司 A kind of the adaptation display methods and device of the news web page page
CN111125564A (en) * 2018-11-01 2020-05-08 百度在线网络技术(北京)有限公司 Thermodynamic diagram generation method and device, computer equipment and storage medium
CN111125564B (en) * 2018-11-01 2023-09-15 百度在线网络技术(北京)有限公司 Thermodynamic diagram generation method, thermodynamic diagram generation device, thermodynamic diagram generation computer device and thermodynamic diagram generation storage medium

Also Published As

Publication number Publication date
CN107220351B (en) 2020-09-29

Similar Documents

Publication Publication Date Title
US10832630B2 (en) Providing a display based electronic survey
US10643023B2 (en) Programmatic native rendering of structured content
CN102112985B (en) To the process of the page
CN102306174B (en) Method and equipment for interacting with user based on web page elements
DE112013004614T5 (en) Gestentastatur with Gestannannullierung
AU2021240156B2 (en) Quantum Control Pulse Generation Method And Apparatus, Device, And Storage Medium
CN103729285A (en) Method, device and system for testing web page
US20200272558A1 (en) Automated layout testing for mobile device applications
US20140325418A1 (en) Automatically manipulating visualized data based on interactivity
CN107220351A (en) The page is left white width calculation method, device, storage medium and electronic equipment
CN105094622B (en) Adjust the method and apparatus of form col width
KR20210106398A (en) Conversation-based recommending method, conversation-based recommending apparatus, and device
CN103473041B (en) A kind of visual data processing method and system
US20230066021A1 (en) Object detection
US20190141110A1 (en) Design Analysis for Framework Assessment
US20170024359A1 (en) Techniques to provide processing enhancements for a text editor in a computing environment
US8707177B1 (en) Resource guide generator for resource pages
CN103679637A (en) Display unit coordinate setting method and device based on mosaic display wall signal window
CN105045464A (en) Method and device for prompting of form filling progress
CN106168959A (en) Page layout method and device
US20120072820A1 (en) Systems and Computer Program Products for Conducting Multi-Window Multi-Aspect Processing and Calculations
US11073965B2 (en) Graphical interface for presentation of interaction data across multiple webpage configurations
JP2022539290A (en) Visual programming for deep learning
US20190318516A1 (en) Electronic apparatus, information processing method, system, and medium
CN104346174B (en) A kind of description of online polar plot modeling process and replay method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant