Customization method and device of web page, electronic equipment and storage medium
By pre-configuring customizable DOM node trigger events on the web page, receiving user-defined triggers and updating the page, the complexity and resource waste of traditional customization methods are solved, achieving efficient personalized customization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-23
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional web page customization methods are lengthy, resource-intensive, and complex, with limited user customization options, failing to meet personalized needs.
By pre-configuring candidate customization trigger events for all customizable native DOM nodes on the page to be customized, the system receives the user's customization trigger events, determines the customizable items, and directly updates the page with the user's customized content, reducing intermediate interaction steps and page switching.
It improves the efficiency and convenience of web page customization, allowing users to customize directly on the current page without creating a new page, thus shortening the customization process.
Smart Images

Figure CN115687831B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a method, apparatus, electronic device, and storage medium for customizing web pages. Background Technology
[0002] Traditional web pages only offer relatively fixed ways of displaying information, but they can no longer meet the growing personalized needs of users. Modern web pages offer customized solutions for user-submitted personalized requests. For example, users may need to customize the displayed text or colors, or define specific rules.
[0003] Existing technologies typically employ two customization methods. The first method involves collecting user customization requests, submitting them to developers for code modification, and then repackaging the page to provide the customized version to the user. The second method involves extracting the configuration items the user needs to customize, adding these configuration items to the page, providing them to the user for configuration, and then rendering the new webpage based on the customized content.
[0004] However, the first customization solution has a longer customization process, involves too many people, and wastes resources. In addition, the increased number of steps brings certain risks to the customization results. The second customization solution requires adding a new customization configuration item page to the page. During the customization process, users need to find the customization configuration item page first, and then find the corresponding configuration item that needs to be modified. This adds to the operation process. At the same time, because a new page needs to be added, the scope of configuration items that can be customized for users is limited. Generally, only some common styles, such as a certain icon or the overall background color, are available. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and storage medium for customizing web pages, which reduces the process for users to customize and modify web pages according to their own needs and improves customization efficiency.
[0006] In a first aspect, embodiments of the present invention provide a method for customizing a web page, comprising:
[0007] Receive a user's target customization trigger event for a target native DOM node on the page to be customized; wherein, the page to be customized is pre-configured with all candidate customization trigger events for customizable native DOM nodes;
[0008] Determine the customizable items of the target native DOM node that are bound to the target custom trigger event;
[0009] Obtain the user's modifications to the customizable items, and update the page to be customized according to the modifications to obtain the customized page.
[0010] In a second aspect, an embodiment of the present application further provides a customization device of a web page, comprising:
[0011] a node customization triggering module configured to receive a target customization triggering event of a target native Dom node on a page to be customized; wherein candidate customization triggering events of all customizable native Dom nodes are pre-configured on the page to be customized;
[0012] a customizable item determining module configured to determine a customizable item of the target native Dom node bound to the target customization triggering event;
[0013] a customization content obtaining module configured to obtain customization content modified by the user on the customizable item, and update the page to be customized according to the customization content to obtain a customized page.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device, comprising:
[0015] one or more processors;
[0016] a storage device configured to store one or more programs,
[0017] when the one or more programs are executed by the one or more processors, the one or more processors implement the customization method of the web page as described in any embodiment of the present application.
[0018] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the customization method of the web page as described in any embodiment of the present application.
[0019] The embodiment of the present application receives a target customization triggering event of a target native Dom node on a page to be customized; wherein candidate customization triggering events of all customizable native Dom nodes are pre-configured on the page to be customized; determines a customizable item of the target native Dom node bound to the target customization triggering event; obtains customization content modified by the user on the customizable item, and updates the page to be customized according to the customization content to obtain a customized page. The embodiment of the present application integrates customizable items of all customizable native Dom nodes on the page to be customized to be open to the user for selection and customization, and hands over the native Dom node to be customized to the user for direct control, without the need to add a page, directly displays on the current page to be customized, reduces intermediate interaction links and the process of page switching during customization, shortens the process of customization and modification of the web page according to the user's own needs, and improves customization efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1is a flowchart of the customization method of the web page in embodiment one of the present application;
[0021] Figure 2 is a customization schematic diagram of the Dom node in the web page in embodiment one of the present application;
[0022] Figure 3 is a structural schematic diagram of the customization device of the web page in embodiment two of the present application;
[0023] Figure 4 is a structural schematic diagram of the electronic device in embodiment three of the present application. DETAILED DESCRIPTION
[0024] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the structures.
[0025] Embodiment one
[0026] Figure 1 is a flowchart of the customization method of the web page in embodiment one of the present application, and the present embodiment can be applicable to the case that the user autonomously customizes and modifies the web page according to the own demand. The method can be executed by the customization device of the web page, which can be realized in the software and / or hardware manner, and can be configured in the electronic device, for example, the electronic device can be a background server or other device with communication and calculation ability. As shown in the figure, the method specifically includes: Figure 1
[0027] Step 101, receiving a target customization trigger event of a target native Dom node on a page to be customized; wherein the candidate customization trigger events of all customizable native Dom nodes are pre-configured on the page to be customized.
[0028] Wherein, the page to be customized refers to the web page that needs to be customized and modified, and all customizable items of the customizable native Dom nodes are integrated and exposed to the user on the page to be customized, so as to customize and modify the page to be customized according to the exposed customizable items. By pre-configuring the customization trigger events of all customizable native Dom nodes on the page to be customized, the customizable item information bound with the target customization trigger event can be displayed when the user triggers the target customization trigger event of the target native Dom node by binding the customization trigger event with the customizable item of each node.
[0029] Specifically, the user enters the page customization mode according to the pre-set customization trigger rule when the user needs to customize the current page according to the user's own needs. In the page customization mode, all candidate customization trigger events of the customizable native Dom nodes on the page are opened to the user for selection. The user selects the target native Dom node that the user wants to customize from all customizable native Dom nodes according to the user's own needs, and triggers the target customization trigger event of the target native Dom node according to the pre-set customization trigger rule.
[0030] For example, the user enters the page customization mode by a convention rule such as keyboard combination or a specific button on the page. In the page customization mode, the user controls the mouse to select the target native Dom node from all customizable native Dom nodes on the page according to the user's own needs. After selecting the target native Dom node, the target customization trigger event of the target native Dom node is triggered, for example, by single-click or double-click. The click event dbClick (double-click event) of the Dom node is re-encapsulated, but is not limited to dbclick. Other triggering methods can also be used. In addition, a page customization mode judgment can be added to the triggering click event. If the page customization mode is triggered, the target customization trigger event is triggered. If not, other pre-set rules are triggered.
[0031] In a feasible embodiment, before step 101, the method further includes:
[0032] Determining that the native Dom node supporting customization on the page to be customized is a customizable native Dom node;
[0033] Configuring an associated customization trigger event for the customizable native Dom node;
[0034] Binding the customizable item of the customizable native Dom node to the customization trigger event.
[0035] Pre-developing the page customization mode of the page to be customized, that is, in the development stage, the exposure manner of the customizable item of the native Dom node supporting customization on the page to be customized is bound to the user triggerable event, wherein the user triggerable event is the customization trigger event, and the processing logic bound to the customization trigger event corresponds to the customizable item content of the customizable native Dom node.
[0036] All native Dom nodes on the page to be customized can theoretically support customization, and different ranges of native Dom nodes supporting customization can be opened according to actual conditions. Specifically, all native Dom nodes on the page to be customized, including the component component Dom nodes, are determined as customizable native Dom nodes, each associated customization trigger event is pre-configured for each customizable native Dom node, and the processing logic is bound for the customization trigger event, that is, the processing logic is the display of the customizable item information of the associated native Dom node. For example, after the customization trigger event configuration is completed, when the mouse is located within the range of any customizable native Dom node in the page customization mode, the customization trigger event of the node is triggered, and the customizable item information of the node is displayed. For example, the page code logic integrates the acquisition, positioning and exposure mode of the Dom node attribute style and the re-rendering, etc., encapsulates the customization process in the page code logic, and makes the user operation unperceived.
[0037] In a feasible embodiment, the customization trigger event includes a hovering event or a clicking event.
[0038] Correspondingly, step 101 comprises:
[0039] When the mouse hovering or clicking on the target native Dom node is received, it is determined that the target customization trigger event of the target native Dom node is triggered.
[0040] The customization trigger event of the native Dom node is pre-configured, which can be a mouse hovering event or a clicking event, etc. It can be set according to actual conditions, which is not limited herein.
[0041] Specifically, when the user hovers the mouse on the target native Dom node or clicks the target native node with the mouse, it indicates that the target customization trigger event of the target native Dom node is triggered.
[0042] In a feasible embodiment, before step 101, the method further comprises:
[0043] Receiving a target selection event of a target native Dom node on the page to be customized by a user;
[0044] Determining the customization identifier of the target native Dom node bound with the target selection event;
[0045] Receiving a target customization trigger event triggered by a user according to the customization identifier.
[0046] The customization identifier is used to represent whether the target native Dom node supports customization modification by the user. The target selection event is bound to the customization identifier, and is used to represent the selection of the native Dom node by the user. The target selection event and the target customization trigger time can be set as different events. For example, the selection event is a hovering event, and the customization trigger event is a clicking event.
[0047] Specifically, when the page to be customized is in the page customization mode, the user selects a target native Dom node from all native Dom nodes on the page to be customized by using a mouse. For example, when the mouse hovers over any native Dom node, the native Dom node is determined to be the target native Dom node, and a target selection event of the node is triggered. The customization identifier bound to the target selection event of the node is displayed. If the customization identifier represents that the target native Dom node can be customized, the user can then trigger a target customization trigger event of the target native Dom node, for example, by clicking the target native Dom node by using the mouse, which indicates that the target customization trigger event is triggered. If the customization identifier represents that the target native Dom node cannot be customized, the user cannot trigger the target customization trigger event by clicking the target native Dom node, and a prompt message that the node cannot be customized can be displayed.
[0048] For example, the user enters the page customization mode by using an agreement rule such as a keyboard combination, and a customizable mark is displayed for a region with a customization identifier when the mouse hovers over the region, for example, the region is framed. Double-clicking the customization region can enter the customization modification mode, and clicking the region can pop up a page to display customizable Dom attributes and styles, so that the customization element is displayed to the user for direct selection and setting, and the customization element is made flowable. The page customization mode is exited by using a preset button or a combination of keys, and the customization identifier is no longer displayed when the mouse hovers over the Dom node. Optionally, a double-click event triggers the resumption of the state before entering the page customization mode.
[0049] In a feasible embodiment, before step 101, the method further includes:
[0050] obtaining identity information of the user;
[0051] determining a range of customizable native Dom nodes associated with the identity information on the page to be customized;
[0052] determining a candidate customization trigger event open to the user on the page to be customized according to the range of the customizable native Dom nodes.
[0053] The identity information of the user is used to represent the customization authority of the user. For example, the identity information can be determined according to a page login account.
[0054] The customization permission of different login accounts is determined in advance, after obtaining the login account of the user, the customization permission of the account is determined, the range of the customizable native Dom node associated with the permission on the page to be customized is determined according to the customization permission, and the customization trigger event of the customizable native Dom node in the range is opened to the user. The user cannot trigger the customization trigger event of the native Dom node not in the range.
[0055] For example, the customization permission can be assigned to the user, the webpage increases the customization hidden mode, the customization Dom node display range control can be entered through the agreed rules, and the control of whether the currently selected area Dom can be customized can be achieved by implanting the customization identifier into the customizable Dom node. For example, on the basis of the above example, when the user logs in the page to be customized, the native Dom node with the customizable identifier associated with the account of the user is determined according to the account information of the user, when the mouse of the user hovers over the native Dom node with the customizable identifier, the customization identifier is displayed to indicate that the node can be customized, and then the user can trigger the target customization trigger event of the target native Dom node, for example, clicks the target native Dom node with the mouse, which indicates that the target customization trigger event is triggered. When the mouse of the user hovers over the native Dom node without the customizable identifier, the customization identifier is not displayed to indicate that the node cannot be customized, and then the user cannot trigger the customization trigger event of the node.
[0056] The customization permission of the user to the page is limited through the identity information of the user, problems caused by unlimited customization and modification of the page are avoided, and the accuracy of page customization is improved.
[0057] Step 102, determine the customizable item of the target native Dom node bound to the target customization trigger event.
[0058] The customization trigger event of each node is bound to the customizable item information of the node in advance. When the user triggers the target customization trigger event of the target native Dom node, the bound customizable item information of the node is displayed to the user for selection and modification.
[0059] In a feasible embodiment, the customizable item includes an attribute customization item and a style customization item of the native Dom node.
[0060] The attribute customization item of the native Dom node refers to the content that can be customized in the attribute information of the node, for example, the attribute customization item includes the placeholder attribute and constraint rules of the input box; the style customization item of the native Dom node refers to the content that can be customized in the style information of the node, for example, the style customization item includes width, height and color. The attribute customization item and the style customization item of different native Dom nodes can be set according to actual conditions, which are not limited here.
[0061] For example, the current target Dom node and adjacent Dom node attributes and styles are obtained by extending the prototype chain binding of the native click event. If in the customization mode, the attributes and styles of the current clicked Dom node are obtained. The openable styles and attributes can be determined in advance during the development stage, such as open color, width, tip prompt, placeholder prompt, length constraint rule, etc. For example Figure 2 Fig. 3 shows a customized schematic diagram of a Dom node in a web page, wherein the DOM element and the Dom node.
[0062] Step 103, obtaining the customization content of the user's modification on the customizable item, and updating the page to be customized according to the customization content to obtain a customized page.
[0063] When the customizable item information of the target native Dom node is displayed on the page to be customized, the user customizes and modifies the customizable item information according to the needs. After the user completes the modification, the customization content of the user's modification on the customizable item is obtained, and the page to be customized is updated in real time according to the modified customization content to obtain a modified customized page. Optionally, after updating the page in real time, the customization content is sent to the server, and the server generates a customization file to save the customization content, so that the page can be displayed according to the customization file when logging in again next time.
[0064] For example, the user enters the page customization mode according to the customization trigger rule according to the user's own needs, and self-help customizes the required page Dom node, such as modifying the prompt of the input box, modifying the website login page logo, etc. After the modification is completed, the customization mode is exited, and the customization result takes effect immediately, that is, the web locally re-renders a new customized page according to the modified data, and does not need to involve modifying the page code, etc. Only the mouse needs to be clicked to complete, thereby improving the efficiency and convenience of customization.
[0065] In a feasible embodiment, updating the page to be customized according to the customization content to obtain a customized page, comprising:
[0066] Sending the customization content to the server through a preset interface, and generating a customization file according to the customization content by the server;
[0067] Sending a page refresh instruction to the server, receiving an update result of the page to be customized according to the customization file by the server, and obtaining a refreshed customized page.
[0068] After the user determines the customized content for the target native Dom node, the page sends the customized content to the server through a preset interface, the server generates a customized file according to the customized content, when the user exits the page customization mode, the web page end sends a page refresh instruction to the server, the server updates and renders the page to be customized according to the content in the customized file in priority order, and obtains the refreshed customized page. If the content not included in the customized file is set according to the default configuration of the page, that is, the priority of the customized file in the page rendering process is the highest.
[0069] The embodiment of the application integrates all customizable items of all customizable native Dom nodes on the page to be customized and opens them to the user for selection and customization, and the native Dom node to be customized is directly controlled by the user without adding a page, and is directly displayed on the current page to be customized, thereby reducing intermediate interaction links and the process of page switching during customization, shortening the process of customization and modification of the web page according to the user's own needs, and improving customization efficiency.
[0070] Embodiment two
[0071] Figure 3 is a structural schematic diagram of a customization device of the web page in the embodiment two of the application, and the embodiment can be applied to the case that the user autonomously customizes and modifies the web page according to the user's own needs. As shown in the figure, Figure 3 The device comprises:
[0072] The node customization triggering module 310 is configured to receive a target customization triggering event of a target native Dom node on a page to be customized by the user, wherein all candidate customization triggering events of all customizable native Dom nodes are preconfigured on the page to be customized.
[0073] The customizable item determination module 320 is configured to determine a customizable item of the target native Dom node bound to the target customization triggering event.
[0074] The customization content acquisition module 330 is configured to acquire customized content of the customizable item modified by the user, and update the page to be customized according to the customized content, and obtain a customized page.
[0075] The embodiment of the application integrates all customizable items of all customizable native Dom nodes on the page to be customized and opens them to the user for selection and customization, and the native Dom node to be customized is directly controlled by the user without adding a page, and is directly displayed on the current page to be customized, thereby reducing intermediate interaction links and the process of page switching during customization, shortening the process of customization and modification of the web page according to the user's own needs, and improving customization efficiency.
[0076] Optionally, the apparatus further comprises a node customization trigger configuration module configured to determine, before receiving a target customization trigger event of a target native Dom node on a page to be customized by a user, that a native Dom node on the page to be customized that supports customization is a customizable native Dom node.
[0077] Optionally, the apparatus further comprises a node customization trigger configuration module configured to determine, before receiving a target customization trigger event of a target native Dom node on a page to be customized by a user, that a native Dom node on the page to be customized that supports customization is a customizable native Dom node.
[0078] Optionally, the apparatus further comprises a node customization trigger configuration module configured to determine, before receiving a target customization trigger event of a target native Dom node on a page to be customized by a user, that a native Dom node on the page to be customized that supports customization is a customizable native Dom node.
[0079] Optionally, the customization trigger event comprises a hovering event or a clicking event.
[0080] Optionally, the customization trigger event comprises a hovering event or a clicking event.
[0081] Optionally, the customization trigger event comprises a hovering event or a clicking event.
[0082] Optionally, the apparatus further comprises a customization range determination module configured to obtain identity information of a user before receiving a target customization trigger event of a target native Dom node on a page to be customized by the user.
[0083] Optionally, the customization range determination module is configured to determine a range of customizable native Dom nodes on the page to be customized that are associated with the identity information.
[0084] Optionally, the customization range determination module is configured to determine a range of customizable native Dom nodes on the page to be customized that are associated with the identity information.
[0085] Optionally, the customization content acquisition module is configured to:
[0086] Optionally, the customization content acquisition module is configured to:
[0087] Optionally, the customization content acquisition module is configured to:
[0088] Optionally, the customizable item comprises an attribute customization item and a style customization item of the native Dom node.
[0089] Optionally, the apparatus further comprises a node customization identifier determination module configured to receive a target selection event of a target native Dom node on a page to be customized by a user before receiving a target customization trigger event of the target native Dom node on the page to be customized by the user.
[0090] Optionally, the node customization identifier determination module is configured to determine a customization identifier of the target native Dom node that is bound to the target selection event.
[0091] receiving a target customization triggering event triggered by the user according to the customization identifier.
[0092] The customization apparatus of the web page provided by the embodiments of the present application can execute the customization method of the web page provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of executing the customization method of the web page.
[0093] Embodiment three
[0094] Figure 4 is a structural schematic diagram of an electronic device provided by embodiment three of the present application. Figure 4 A block diagram of an exemplary electronic device 12 suitable for implementing an embodiment of the present application is shown. Figure 4 The electronic device 12 shown is merely one example. It should not be considered a limitation on the functioning and usefulness of any of the embodiments of the present application.
[0095] As shown in Figure 4 The electronic device 12 is in the form of a general-purpose computing device. Components of electronic device 12 can include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that couples various system components including system memory 28 to processor 16.
[0096] Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics bus, a processor or local bus using any of a variety of bus architectures. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0097] Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and non-volatile media, removable and non-removable media.
[0098] System memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 34 can be provided for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive"). Figure 4 not shown, is generally referred to as a "hard disk drive". Although Figure 4A disk drive, a floppy disk drive, and / or other mass storage device can be provided, which can be used in connection with the computer system 10 to input and output data and to install programs, such as for example an operating system and applications programs as described herein. It should be understood, that the computer system 10 can also include other means coupled to bus 18 for inputting and outputting data, such as an input device 24, e.g., a keyboard, a pointing device, a display 26, etc. From these various
[0099] Program / utility 40 having a set (at least one) of program modules 42 can be stored in memory 28 by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, can include implementation of the network environment as in each of these examples or some combination thereof. Program modules 42 generally carry out the functions and / or methodologies of embodiments of the application as described herein.
[0100] The electronic device 12 can also communicate with one or more external devices 14 such as a keyboard or pointing device, a display 26, etc. through input / output (I / O) interface(s) 22. Further, the electronic device 12 can communicate with one or more networks such as a local area network (LAN), a wide area network (WAN), and / or the Internet through network adapter 20. As Figure 4 illustrated, network adapter 20 communicates with the other components of the electronic device 12 through bus 18. It should be understood that although not shown, other hardware and / or software components could be used in conjunction with the electronic device 12. These components, as well as the electronic device 12 itself, are provided as examples only and are not intended to suggest particular Figure 4 implementation, as such software can be desirably provided in one or more computer systems or other processing systems.
[0101] The processing unit 16 executes the program from the system memory 28 in order to carry out various functions as well as data processing, such as implementing the method for customizing web page according to embodiments of the present application, including:
[0102] receiving a target customization trigger event of a target native Dom node on a page to be customized; wherein candidate customization trigger events of all customizable native Dom nodes are pre-configured on the page to be customized;
[0103] determining a customizable item of the target native Dom node bound with the target customization trigger event;
[0104] obtaining customization content modified by the user on the customizable item, and updating the page to be customized according to the customization content to obtain a customized page.
[0105] Embodiment Four
[0106] The embodiment four of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method for customizing a web page provided by the embodiment of the present application, and the method comprises the following steps of:
[0107] receiving a target customization trigger event of a target native Dom node on a page to be customized, wherein candidate customization trigger events of all customizable native Dom nodes are pre-configured on the page to be customized;
[0108] determining a customizable item of the target native Dom node bound with the target customization trigger event;
[0109] obtaining customization content modified by the user on the customizable item, and updating the page to be customized according to the customization content to obtain a customized page.
[0110] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, device or apparatus.
[0111] The computer readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which a computer readable program code is borne. Such a propagated data signal can take multiple forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can send, propagate or transmit a program for use by or in connection with an instruction execution system, device or apparatus.
[0112] The program code embodied on the computer readable media can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0113] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0114] Note that, as previously discussed, the above merely describes a few exemplary embodiments of the present application and the principles of technology used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made thereto without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for customizing a web page, characterized in that, include: Entering the page customization mode according to the pre-set customization trigger rules, in the page customization mode, all candidate customization trigger events and customizable items of the customizable native DOM nodes on the page to be customized are made available to the user for selection; Receive a user's target customization trigger event for a target native DOM node on the page to be customized; wherein, the page to be customized is pre-configured with all candidate customization trigger events for customizable native DOM nodes; Determine the customizable items of the target native DOM node that are bound to the target custom trigger event; Obtain the user's modifications to the customizable items, and update the page to be customized according to the modifications to obtain the customized page; The method further includes, before receiving the user's target customization trigger event for the target native DOM node on the page to be customized: Receive the target selection event of the target native DOM node on the page to be customized; Determine the custom identifier of the target native DOM node bound to the target selection event; wherein, the custom identifier is used to characterize whether the target native DOM node supports customization and modification by the user; Receive the target customized trigger event triggered by the user based on the customized identifier.
2. The method according to claim 1, characterized in that, Before receiving the user's target customization trigger event for the target native DOM node on the page to be customized, the method further includes: The native DOM nodes that support customization on the page to be customized are identified as customizable native DOM nodes. Configure associated custom trigger events for the customizable native DOM nodes; Bind the customizable items of the customizable native DOM node to the custom trigger event.
3. The method according to claim 1, characterized in that, Custom trigger events include hover events or click events; Correspondingly, receive target customization trigger events for the target native DOM node on the page to be customized, including: If a mouse hover or click is received on the target native DOM node, then the target native DOM node's custom trigger event is determined to be triggered.
4. The method according to claim 1, characterized in that, Before receiving the user's target customization trigger event for the target native DOM node on the page to be customized, the method further includes: Obtain user identity information; Determine the range of customizable native DOM nodes associated with the identity information on the page to be customized; Based on the scope of the customizable native DOM nodes, determine the candidate customization trigger events that can be made available to the user on the page to be customized.
5. The method according to claim 1, characterized in that, The page to be customized is updated according to the customized content to obtain the customized page, including: The customized content is sent to the server through a preset interface, and the server generates a customized file based on the customized content. Send a page refresh command to the server, receive the server's update result for the page to be customized based on the customization file, and obtain the refreshed customized page.
6. The method according to claim 1, characterized in that, The customizable items include attribute customization items and style customization items for native DOM nodes.
7. A web page customization device, characterized in that, include: The node customization trigger module is used to receive the target customization trigger event of the target native DOM node by the user on the page to be customized; wherein, the page to be customized is pre-configured with all candidate customization trigger events of the customizable native DOM nodes; wherein, according to the pre-set customization trigger rules, the page customization mode is entered, and in the page customization mode, all candidate customization trigger events and customizable items of the customizable native DOM nodes on the page to be customized are made available to the user for selection; The customizable item determination module is used to determine the customizable items of the target native DOM node that is bound to the target customization trigger event; The customized content acquisition module is used to acquire the customized content modified by the user for the customizable items, and update the page to be customized according to the customized content to obtain the customized page; The node customization identifier determination module is used to receive a target selection event of a target native DOM node on the page to be customized before receiving a target customization trigger event of a target native DOM node from a user on the page to be customized; determine the customization identifier of the target native DOM node bound to the target selection event; and receive a target customization trigger event triggered by the user based on the customization identifier; wherein, the customization identifier is used to characterize whether the target native DOM node supports customization and modification by the user.
8. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the web page customization method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the method for customizing web pages as described in any one of claims 1-6.
Citation Information
Patent Citations
Web page front-end display method and system for constructing two-way binding based on json data
CN113051507A