CN104899217B - A kind of implementation method and device of custom feature - Google Patents

A kind of implementation method and device of custom feature Download PDF

Info

Publication number
CN104899217B
CN104899217B CN201410080918.1A CN201410080918A CN104899217B CN 104899217 B CN104899217 B CN 104899217B CN 201410080918 A CN201410080918 A CN 201410080918A CN 104899217 B CN104899217 B CN 104899217B
Authority
CN
China
Prior art keywords
hot spot
custom feature
identification information
attribute information
function
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.)
Active
Application number
CN201410080918.1A
Other languages
Chinese (zh)
Other versions
CN104899217A (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.)
Advanced New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201410080918.1A priority Critical patent/CN104899217B/en
Publication of CN104899217A publication Critical patent/CN104899217A/en
Application granted granted Critical
Publication of CN104899217B publication Critical patent/CN104899217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application discloses a kind of implementation method of custom feature and devices, to solve to realize the less efficient of custom feature in the prior art, to the more demanding problem of CMS administrators.CMS receives the attribute information for the input of each picture hot spot, when CMS identifies in each attribute information the identification information there are custom feature, perform script is added into webpage, client can search function file corresponding to identification information of preconfigured each custom feature by the perform script, and execute the code for including in the function file found.Pass through the above method, CMS administrators by the function setting of picture hot spot be custom feature when, directly the attribute information of picture hot spot is set to the identification information of the custom feature, without manual compiling code, therefore, the efficiency for realizing custom feature can be effectively improved.

Description

A kind of implementation method and device of custom feature
Technical field
This application involves field of computer technology more particularly to the implementation methods and device of a kind of custom feature.
Background technology
Content Management System(ContentManagementSystem, CMS)Be one kind can accelerate Website development speed, The system for reducing development cost, wherein the drafting of picture hot spot is one of major function of CMS, is used in the picture of webpage Picture hot spot is drawn, and the function of picture hot spot is set.
Picture hot spot be webpage picture in embed link.Currently, there are two types of the functions of picture hot spot, one is hyperlinks It connects, one is anchor points.
In general, for a picture in webpage, which can be divided into several parts, division any one Part all can serve as a picture hot spot.Can be to jump to some webpage or some net by the function setting of a picture hot spot Some anchor point in page(Anchor point is the label of the preset designated position in a webpage)The position marked.
Specifically, CMS administrators can set the attribute information of picture hot spot to the corresponding unification of the webpage to be jumped to Resource Locator(Uniform Resource Locator, URL), then the function of the picture hot spot is hyperlink at this time.May be used also Set the attribute information of the picture hot spot to the corresponding URL of anchor point of webpage, then the function of the picture hot spot is anchor point at this time. When the user clicks when the picture hot spot, client can then jump to the URL for including in the attribute information of the picture hot spot and correspond to Webpage(Hyperlink connection function)Or the position that the anchor point of webpage is marked(Anchor point function).
But with the continuous development of Internet technology, the functions of the two picture hot spots of hyperlink and anchor point by It cannot gradually meet user demand, how as needed the function of picture hot spot customized be set to one and urgently solve Certainly the problem of.
In the prior art, if being the self-defined work(in addition to hyperlink and anchor point by the function setting of picture hot spot It can, it is necessary to which the attribute information of the picture hot spot is manually written as the code of the custom feature by CMS administrators, such as Javascript codes etc., but also manually the code write to be embedded into the code of webpage, so that user is being clicked the figure When piece hot spot, client can directly execute the code write in the attribute information of the picture hot spot, to realize custom feature. Obviously, realize that the method for custom feature is less efficient in the prior art.
Invention content
The embodiment of the present application provides a kind of implementation method and device of custom feature, to solve to realize in the prior art The less efficient problem of custom feature.
A kind of implementation method of custom feature provided by the embodiments of the present application, including:
Content Management System CMS receives the attribute information for each picture hot spot input in webpage, wherein is directed to one The attribute information of picture hot spot input includes the identification information of custom feature, the corresponding uniform resource position mark URL of webpage, net At least one of the corresponding URL of anchor point in page;And
Identify each attribute information of input;And
When, there are when the identification information of custom feature, being added into the webpage in each attribute information for identifying input Perform script, wherein function corresponding to identification information of the perform script for searching preconfigured each custom feature File, and execute the code for including in the function file found.
A kind of implementation method of custom feature provided by the embodiments of the present application, including:
When picture hot spot in client control to webpage is triggered, judge whether the function of the picture hot spot is to make by oneself Adopted function, wherein when the function of the picture hot spot is custom feature, then the attribute information of the picture hot spot is to make by oneself The identification information of adopted function, when the function of the picture hot spot is hyperlink or anchor point, then the attribute of the picture hot spot is believed Breath is uniform resource position mark URL;
If so, by the perform script in the webpage, obtain self-defined in the attribute information of the picture hot spot The identification information of function searches work(corresponding to the identification information of the preconfigured custom feature by the perform script Energy file, and execute the code for including in the function file found;
Otherwise, it is redirected according to the URL in the attribute information of the picture hot spot.
A kind of realization device of custom feature provided by the embodiments of the present application, including:
Receiving module receives the attribute information for each picture hot spot input in webpage, wherein be directed to a picture heat The attribute information of point input includes in the identification information of custom feature, the corresponding uniform resource position mark URL of webpage, webpage At least one of corresponding URL of anchor point;
Identification module identifies each attribute information of input;
Add module, when there are the mark of custom feature letters in each attribute information that the identification module identifies input When breath, perform script is added into the webpage, wherein the perform script is for searching preconfigured each custom feature Function file corresponding to identification information, and execute the code for including in the function file found.
A kind of realization device of custom feature provided by the embodiments of the present application, including:
Judgment module, when monitoring the picture hot spot in webpage and being triggered, judge the picture hot spot function whether be Custom feature, wherein when the function of the picture hot spot is custom feature, then the attribute information of the picture hot spot is The identification information of custom feature, when the function of the picture hot spot is hyperlink or anchor point, then the category of the picture hot spot Property information be uniform resource position mark URL;
Custom feature execution module passes through holding in the webpage when the judging result of the judgment module is to be This is traveled far and wide, the identification information of the custom feature in the attribute information of the picture hot spot is obtained, is looked by the perform script The function file for looking for the identification information of the preconfigured custom feature corresponding, and execute the function file found In include code;
Jump module, when the judging result of the judgment module is no, according in the attribute information of the picture hot spot URL redirected.
The embodiment of the present application provides a kind of implementation method and device of custom feature, and this method CMS, which is received, is directed to each figure The attribute information of piece hot spot input, wherein the attribute information of input includes that the identification information of custom feature, webpage are corresponding One kind in URL, webpage in the corresponding URL of anchor point, when CMS identifies each attribute information kind, there are the mark of custom feature letters When breath, perform script is added into webpage, client can search preconfigured each custom feature by the perform script Function file corresponding to identification information, and execute the code for including in the function file found.Pass through the above method, CMS pipes Reason person by the function setting of picture hot spot be custom feature when, directly set the attribute information of picture hot spot to this and make by oneself Therefore the identification information of adopted function, can effectively improve the efficiency for realizing custom feature without manual compiling code.
Description of the drawings
Attached drawing described herein is used for providing further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please do not constitute the improper restriction to the application for explaining the application.In the accompanying drawings:
Fig. 1 is the realization process of custom feature provided by the embodiments of the present application;
Fig. 2 is the schematic diagram of the function provided by the embodiments of the present application that picture hot spot is arranged on CMS;
Fig. 3 is the realization device structural schematic diagram of the first custom feature provided by the embodiments of the present application;
Fig. 4 is the realization device structural schematic diagram of second of custom feature provided by the embodiments of the present application.
Specific implementation mode
In order to improve the efficiency that the custom feature in addition to hyperlink and anchor point is arranged for picture hot spot in CMS, this It can will realize that the function file of each custom feature preserves in the server in advance in application embodiment, and be each self-defined work( The identification information of custom feature can be set, when custom feature will be arranged for picture hot spot in CMS in CMS administrators, only The identification information that custom feature need to be inputted in the attribute information of picture hot spot, without writing code.
To keep the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Go out the every other embodiment obtained under the premise of creative work, shall fall in the protection scope of this application.
Fig. 1 is the realization process of custom feature provided by the embodiments of the present application, specifically includes following steps:
S101:CMS receives the attribute information for each picture hot spot input in webpage.
It in the embodiment of the present application, can be in CMS when the function of some picture hot spot will be arranged in CMS administrators in CMS Input the attribute information of the picture hot spot.Wherein, the attribute information of CMS administrators input can be that the mark of custom feature is believed At least one of the corresponding URL of anchor point in breath, the corresponding URL of webpage, webpage.It should be noted that the embodiment of the present application Described in custom feature identification information be not be code for realizing the custom feature, can be with pseudocode Form pre-sets the identification information of each custom feature.
For example, for some picture hot spot in webpage, it is assumed that the function setting of the picture hot spot is by CMS administrators When the user clicks when the picture hot spot, a suspension windows are popped up on the webpage, then this to be arranged function is exactly to remove hyperlink It connects and the custom feature other than anchor point.Assuming that the identification information of the custom feature is #@miniLogin(The identification information is The identification information of pseudocode form), then the attribute information that CMS administrators can input the picture hot spot in CMS is #@ miniLogin。
S102:Each attribute information of CMS identification inputs.
In the embodiment of the present application, after CMS administrators have input the attribute information of each picture hot spot on CMS, CMS needs For each attribute information of input, identify that the attribute information is specifically the identification information or webpage or anchor point of custom feature Corresponding URL.
Specifically, the identification information of the custom feature described in the embodiment of the present application is made of multiple characters, default When the identification information of each custom feature, the character in the identification information of each custom feature on designated position can be arranged For designated character.When then CMS identifies some attribute information of CMS administrators input, designated position in the attribute information can determine whether On character whether be the designated character, if so, determine the attribute information be custom feature identification information, otherwise, really The fixed attribute information is not the identification information of custom feature, i.e. the attribute information is webpage or the corresponding URL of anchor point.
Continue to use the example above, it, can be by the mark of each custom feature when presetting the identification information of each custom feature Know first character in information and is set as " # " character(That is, designated position is first character, designated character is " # " character), Such as #@miniLogin, #@bookmark.Then CMS receives the attribute information #@of the picture hot spot of CMS administrators input After miniLogin, judge that the first character of attribute information #@miniLogin is " # " character, it is thus determined that the figure of input The attribute information #@miniLogin of piece hot spot are the identification information of custom feature.
S103:When CMS identifies in each attribute information of input the identification information there are custom feature, to the webpage Middle addition perform script.
Wherein, function text corresponding to identification information of the perform script for searching preconfigured each custom feature Part, and execute the code for including in the function file found.
In the embodiment of the present application, in the attribute information of each picture hot spot for identifying input by step S102 as CMS There are when the identification information of custom feature, perform script can be added into the webpage.It can carry in the perform script and respectively make by oneself The acquisition address of function file corresponding to identification information of adopted function, in this way, client is in the picture that function is custom feature When hot spot is triggered, you can by the perform script, the identification information for getting the custom feature of the picture hot spot is corresponding Function file, and the code for including in the function file is executed, to realize the custom feature.
In addition, in the embodiment of the present application, when there are the marks of custom feature in each attribute information that CMS identifies input When knowing information, it can be also directed to the picture hot spot for the identification information that each attribute information is custom feature, to the picture hot spot Realize that code is called in addition in code, the calling code is for calling above-mentioned perform script when picture hot spot is triggered.
It is added to after calling code and perform script, CMS can then issue the webpage of the function provided with picture hot spot.
S104:Whether each picture hot spot in client control webpage is triggered.
In the embodiment of the present application, client can monitor user to the operation behavior of each picture hot spot in webpage, work as prison When controlling user and clicking some picture hot spot in webpage, determine that the picture hot spot is triggered.
S105:When the picture hot spot in client control to webpage is triggered, judge the picture hot spot function whether For custom feature, if so, S106 is thened follow the steps, it is no to then follow the steps S107.
Wherein, calling is added to due to CMS respectively to the picture hot spot that each function in webpage is custom feature Code, therefore, client can determine whether the picture hot spot when whether the function of judging a picture hot spot is custom feature It realizes whether comprising calling code in code, if so, determine that the function of the picture hot spot is custom feature, otherwise, it determines The function of the picture hot spot is not custom feature.
Continue to use the example above, CMS is by after Homepage Publishing, and user when using the Client browse webpage, then may be used by client Whether each picture hot spot monitored in the webpage is triggered.The attribute information is the picture of #@miniLogin when the user clicks When hot spot, client then determines that the function of the picture hot spot is triggered, and determines in the realization code of the picture hot spot comprising tune With code, it is thus determined that the function of the picture hot spot is custom feature.
S106:Client obtains the self-defined work(in the attribute information of the picture hot spot by the perform script in webpage The identification information of energy, function file corresponding to the identification information of the preconfigured custom feature is searched by perform script, And execute the code for including in the function file found.
In the embodiment of the present application, it can in advance be write for realizing the code of each custom feature by programmer, such as can To write code using Javascript, and the code for each custom feature write is stored in each custom feature respectively In function file corresponding to identification information, then in the server by each function file configuration.
It, can be first when S105 determines that the function for the picture hot spot being triggered is custom feature to client through the above steps The calling code realized in code for executing the picture hot spot to call perform script, then by the perform script of calling, obtains The identification information of custom feature in the attribute information of the picture hot spot searches the mark of the preconfigured custom feature The corresponding function file of information, and the code for including in the function file found is executed, to realize the custom feature.
Continue to use the example above, client identify attribute information be the function of the picture hot spot of #@miniLogin be from After defined function, then the calling code of the picture hot spot realized in code is can perform, to call perform script, then passes through calling Perform script, obtain the attribute information #@miniLogin of the picture hot spot, search preconfigured with #@miniLogin couple The function file answered, and execute the code for including in the function file found, you can it realizes and pops up one on current web page The function of suspension windows.That is, when user clicks the picture hot spot, which is triggered, and is popped up on current web page One suspension windows.
S107:It is redirected according to the URL in the attribute information of the picture hot spot.
When S105 determines that the function for the picture hot spot being triggered is not custom feature to client through the above steps, That is, when the function of the picture hot spot is hyperlink or anchor point, then include in the attribute information of the picture hot spot is hyperlink net The URL of page or anchor point, client then can be redirected directly according to the URL in the attribute information.
By the above method, CMS administrators write when the custom feature of picture hot spot is arranged on CMS without oneself The code for realizing the custom feature, directly input the picture hot spot attribute information be the custom feature identification information i.e. Can, therefore the efficiency of custom feature realization can be effectively improved, and it is proficient in writing for code without CMS administrators, this is also dropped The low requirement to CMS administrators.
Further, the Internet resources that are consumed of function file are obtained to reduce client, visitor in the embodiment of the present application Family end can wouldn't obtain function corresponding to the identification information of the custom feature of each picture hot spot in the webpage when browsing webpage File, but when the custom feature for monitoring some picture hot spot is triggered, then obtain corresponding function file.
And in order to avoid repeating to obtain function file, client is touched in the custom feature for monitoring some picture hot spot When hair, perform script can be first passed through, in function text corresponding to the identification information for locally searching the preconfigured custom feature Part if not found locally, then obtains from server function file corresponding to identification information of the custom feature simultaneously It is stored in local.
Client obtains function file corresponding to identification information of the custom feature by perform script from server When, specifically can according to the acquisition address of function file corresponding to the identification information of the custom feature carried in perform script, Function file corresponding to the identification information of the custom feature is obtained from the corresponding server for obtaining address.
In the embodiment of the present application, above-mentioned perform script can be Javascript scripts.With hypertext markup language (Hyper Text Markup Language, HTML)In the webpage of structure, picture hot spot described in the embodiment of the present application Attribute information can be href attributes, when calling code for the picture hot spot addition that function is custom feature, can will call Code is added in the class attributes of picture hot spot, as shown in Figure 2.
Fig. 2 is the schematic diagram of the function provided by the embodiments of the present application that picture hot spot is arranged on CMS, as shown in Fig. 2, When the function of picture hot spot is set by CMS, first picture can be loaded into CMS, then picture hot spot is set in the picture.
As dotted line area defined is exactly the picture hot spot being arranged in Fig. 2, wherein the picture hot spot that dotted line is surrounded Region can be adjusted as needed.When the user clicks in picture when dotted line area defined, corresponding picture hot spot Then it is triggered.
In fig. 2, it is provided with 3 picture hot spots, respectively hot spot 1, hot spot 2 and hot spot 3 altogether, if by hot spot 1 Function setting is hyperlink, and the function setting of hot spot 2 is anchor point, the function setting of hot spot 3 be when the user clicks hot spot 3 when pop up The custom feature of suspension windows, then:The URL that certain webpage can be inputted in the attribute information input frame of hot spot 1, in hot spot 2 The URL that certain webpage anchor point is inputted in attribute information input frame inputs #@miniLogin in the attribute information input frame of hot spot 3.
Correspondingly, CMS then identifies hot spot 1 and hot spot 2 is not the identification information of custom feature, therefore, can directly by The URL inputted for hot spot 1 is added in the href attributes of the hot spot 1, and the URL inputted for hot spot 2 is added to the hot spot 2 Href attributes in.
And CMS identifies that the first character of the attribute information #@miniLogin of hot spot 3 is designated character " # ", therefore really The attribute information for determining hot spot 3 is the identification information of custom feature, so that it is determined that there are self-defined in 3 attribute informations of input The identification information of function.The attribute information #@miniLogin of hot spot 3 are added in the href attributes of the hot spot 3 by CMS, and will For locating function file and execute the monitor.js scripts of code in function file(Monitor.js scripts are to execute foot This)It is added in webpage, then will be for calling the calling code J_MonitorMap of monitor.js scripts to be added to hot spot 3 In class attributes.
Wherein, monitor.js scripts can be realized by following jQuery codes:
if(!$[name]){loader(root[name],function(){$[name].run();) // work as local When function file corresponding there is no the href attributes got, function file is obtained from server, and execute and get Code in function file;
else{$[name].run();} // when the corresponding function files of the existing href got in local, then directly hold Code in row function file;
... // note:Loader methods are js file loaders;
})
That is, hot spot 1 and hot spot 2 are not present class attributes at this time, and hot spot 3 is there are class attributes, and class attributes are J_MonitorMap。
Assuming that the webpage is built with HTML, then html codes of hot spot 3 at this time(The as realization code of hot spot 3)It can With as follows:
When the Client browse webpage, if user clicks hot spot 1, client control is triggered to hot spot 1. When the realization code of the client executing hot spot 1, there is no call code, root in the realization code due to determining hot spot 1 According to the URL in the href attributes of hot spot 1, the corresponding webpages of the URL are jumped to.
If user clicks hot spot 3, client control is triggered to hot spot 3.In the realization of client executing hot spot 3 When code, due to determining that realizing in code for hot spot 3 exists comprising the class attributes for calling code, class categories are executed Property in calling code J_MonitorMap, after execution client then call arrive monitor.js scripts.Monitor.js scripts The href attributes for then obtaining hot spot 3, the href attributes got are #@miniLogin, therefore monitor.js scripts are at this It searches preconfigured function file corresponding with #@miniLogin and is executed in the function file found if finding in ground Code, execute function file in code after, then a suspension windows can be popped up in current web page, if not finding, Monitor.js scripts can be according to the acquisition address of the self-contained corresponding function files of #@miniLogin, from the acquisition The corresponding function files of #@miniLogin are obtained in the server of location, and execute the code in the function file got.
By upper example as it can be seen that realizing that the key of custom feature is that the execution foot added in webpage in the embodiment of the present application This, needs to obtain function file by perform script and executes the code in function file, and therefore, CMS is receiving CMS management After member is for the attribute information of each picture hot spot input in webpage, if it is determined that there is no make by oneself in each attribute information of input The identification information of adopted function, that is, the function of each picture hot spot of CMS Administrators only have hyperlink and anchor point both, It is then not necessarily to perform script being added in webpage.
In addition, in the embodiment of the present application, can constantly increase custom feature newly, and also preset for newly-increased custom feature Corresponding identification information preserves the function file of newly-increased custom feature in the server, and this just need it is each to carrying The perform script of the acquisition address of function file is constantly updated, to which CMS can also be when perform script updates, will more Perform script after new is added in webpage, to replace original perform script in webpage.
It is the implementation method of custom feature provided by the embodiments of the present application above, is based on same thinking, the application is real The realization device that example additionally provides custom feature is applied, as shown in Figure 3 and Figure 4.
Fig. 3 is the realization device structural schematic diagram of the first custom feature provided by the embodiments of the present application, is specifically included:
Receiving module 301 receives the attribute information for each picture hot spot input in webpage, wherein for a figure The attribute information of piece hot spot input includes the identification information of custom feature, the corresponding uniform resource position mark URL of webpage, webpage In at least one of the corresponding URL of anchor point;
Identification module 302 identifies each attribute information of input;
Add module 303, when there are custom features in each attribute information that the identification module 302 identifies input When identification information, perform script is added into the webpage, wherein the perform script preconfigured is respectively made by oneself for searching Function file corresponding to the identification information of adopted function, and execute the code for including in the function file found.
The identification information of the custom feature is made of character, designated position in the identification information of the custom feature On character be designated character;
The identification module 302 is specifically used for, and for each attribute information of input, judges specific bit in the attribute information Whether the character set is the designated character, if so, determine that the attribute information is the identification information of custom feature, it is no Then, it is the identification information of custom feature to determine the attribute information not.
The add module 303 is additionally operable to, when in each attribute information that the identification module 302 identifies input exist from When the identification information of defined function, for the picture hot spot for the identification information that each attribute information is custom feature, to the figure Code is called in addition in the realization code of piece hot spot, and the calling code is for calling the execution when picture hot spot is triggered Script.
The realization device of specific above-mentioned custom feature as shown in Figure 3 can be located in CMS, such as can be CMS In a plug-in unit.
Fig. 4 is the realization device structural schematic diagram of second of custom feature provided by the embodiments of the present application, is specifically included:
Judgment module 401, when monitoring the picture hot spot in webpage and being triggered, judge the picture hot spot function whether For custom feature, wherein when the function of the picture hot spot is custom feature, then the attribute information of the picture hot spot For the identification information of custom feature, when the function of the picture hot spot is hyperlink or anchor point, then the picture hot spot Attribute information is uniform resource position mark URL;
Custom feature execution module 402 passes through the webpage when the judging result of the judgment module 401 is to be In perform script, obtain the identification information of the custom feature in the attribute information of the picture hot spot, pass through the execution Script searches function file corresponding to identification information of the preconfigured custom feature, and executes the work(found The code for including in energy file;
Jump module 403, when the judging result of the judgment module 401 is no, according to the attribute of the picture hot spot URL in information is redirected.
Whether the judgment module 401 is specifically used for, judge in the realization code of the picture hot spot to include to call code, Wherein, the calling code is for calling the perform script;If so, determining that the function of the picture hot spot is self-defined work( Energy;Otherwise, it determines the function of the picture hot spot is not custom feature.
The custom feature execution module 402 is additionally operable to, and by the perform script in the webpage, obtains the figure Before the identification information of custom feature in the attribute information of piece hot spot, the calling code is executed, to call the execution Script.
The custom feature execution module 402 is specifically used for, and by the perform script, is pre-configured in locally lookup The custom feature function file corresponding to identification information, if not finding, obtained from server described in make by oneself Function file corresponding to the identification information of adopted function.
The custom feature execution module 402 is specifically used for, described self-defined according to what is carried in the perform script The acquisition address of function file corresponding to identification information of function obtains described self-defined from the corresponding server for obtaining address Function file corresponding to the identification information of function.
The realization device of specific above-mentioned custom feature as shown in Figure 4 can be located in client.
The embodiment of the present application provides a kind of implementation method and device of custom feature, and this method CMS, which is received, is directed to each figure The attribute information of piece hot spot input, wherein the attribute information of input includes that the identification information of custom feature, webpage are corresponding One kind in URL, webpage in the corresponding URL of anchor point, when CMS identifies each attribute information kind, there are the mark of custom feature letters When breath, perform script is added into webpage, client can search preconfigured each custom feature by the perform script Function file corresponding to identification information, and execute the code for including in the function file found.Pass through the above method, CMS pipes Reason person by the function setting of picture hot spot be custom feature when, directly set the attribute information of picture hot spot to this and make by oneself Therefore the identification information of adopted function, can effectively improve the efficiency for realizing custom feature without manual compiling code.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM).Memory is showing for computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitorymedia), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described There is also other identical elements in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code Storage media(Including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)The shape of the computer program product of upper implementation Formula.
Above is only an example of the present application, it is not intended to limit this application.For those skilled in the art For, the application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (12)

1. a kind of implementation method of custom feature, which is characterized in that including:
Content Management System CMS receives the attribute information for each picture hot spot input in webpage, wherein is directed to a picture The attribute information of hot spot input includes in the identification information of custom feature, the corresponding uniform resource position mark URL of webpage, webpage At least one of the corresponding URL of anchor point;And
Identify each attribute information of input;And
When there are when the identification information of custom feature, adding and execute into the webpage in each attribute information for identifying input Script, wherein function file corresponding to identification information of the perform script for searching preconfigured each custom feature, And execute the code for including in the function file found.
2. the method as described in claim 1, which is characterized in that the identification information of the custom feature is made of character, institute It is designated character to state the character in the identification information of custom feature on designated position;
Each attribute information for identifying input, specifically includes:
For each attribute information of input, judge whether the character in the attribute information on designated position is the designated word Symbol;
If so, determining that the attribute information is the identification information of custom feature;
Otherwise, it determines the attribute information is not the identification information of custom feature.
3. the method as described in claim 1, which is characterized in that the method further includes:
When in each attribute information for identifying input there are when the identification information of custom feature, for each attribute information be from The picture hot spot of the identification information of defined function, addition calling code, the calling generation into the realization code of the picture hot spot Code is for calling the perform script when picture hot spot is triggered.
4. a kind of implementation method of custom feature, which is characterized in that including:
When picture hot spot in client control to webpage is triggered, judge whether the function of the picture hot spot is self-defined work( It can, wherein when the function of the picture hot spot is custom feature, then the attribute information of the picture hot spot is self-defined work( The identification information of energy, when the function of the picture hot spot is hyperlink or anchor point, then the attribute information of the picture hot spot is Uniform resource position mark URL;
If so, by the perform script in the webpage, the custom feature in the attribute information of the picture hot spot is obtained Identification information, searched by the perform script the preconfigured custom feature identification information it is corresponding function text Part, and execute the code for including in the function file found;
Otherwise, it is redirected according to the URL in the attribute information of the picture hot spot.
5. method as claimed in claim 4, which is characterized in that judge whether the function of the picture hot spot is self-defined work( Can, it specifically includes:
Whether judge in the realization code of the picture hot spot comprising calling code, wherein the calling code is for calling institute State perform script;
If so, determining that the function of the picture hot spot is custom feature;
Otherwise, it determines the function of the picture hot spot is not custom feature.
6. method as claimed in claim 5, which is characterized in that by the perform script in the webpage, obtain the picture Before the identification information of custom feature in the attribute information of hot spot, the method further includes:
The calling code is executed, to call the perform script.
7. method as claimed in claim 5, which is characterized in that search preconfigured described make by oneself by the perform script Function file corresponding to the identification information of adopted function, specifically includes:
The client is by the perform script, in the identification information pair for locally searching the preconfigured custom feature The function file answered obtains function text corresponding to the identification information of the custom feature if not finding from server Part.
8. the method for claim 7, which is characterized in that obtain the identification information of the custom feature from server Corresponding function file, specifically includes:
According to the acquisition address of function file corresponding to the identification information of the custom feature carried in the perform script, Function file corresponding to the identification information of the custom feature is obtained from the corresponding server for obtaining address.
9. a kind of realization device of custom feature, which is characterized in that including:
Receiving module receives the attribute information for each picture hot spot input in webpage, wherein defeated for a picture hot spot The attribute information entered includes the anchor point in the identification information of custom feature, the corresponding uniform resource position mark URL of webpage, webpage At least one of corresponding URL;
Identification module identifies each attribute information of input;
Add module, when there are the identification informations of custom feature in each attribute information that the identification module identifies input When, add perform script into the webpage, wherein the perform script is for searching preconfigured each custom feature Function file corresponding to identification information, and execute the code for including in the function file found.
10. device as claimed in claim 9, which is characterized in that the identification information of the custom feature is made of character, institute It is designated character to state the character in the identification information of custom feature on designated position;
The identification module is specifically used for, and for each attribute information of input, judges in the attribute information on designated position Whether character is the designated character, if so, determine that the attribute information is the identification information of custom feature, otherwise, it determines The attribute information is not the identification information of custom feature.
11. device as claimed in claim 9, which is characterized in that the add module is additionally operable to, when the identification module identifies Go out in each attribute information of input there are when the identification information of custom feature, is custom feature for each attribute information The picture hot spot of identification information, the addition calling code into the realization code of the picture hot spot, the calling code is for scheming Piece hot spot calls the perform script when being triggered.
12. a kind of realization device of custom feature, which is characterized in that including:
Judgment module judges whether the function of the picture hot spot is to make by oneself when monitoring the picture hot spot in webpage and being triggered Adopted function, wherein when the function of the picture hot spot is custom feature, then the attribute information of the picture hot spot is to make by oneself The identification information of adopted function, when the function of the picture hot spot is hyperlink or anchor point, then the attribute of the picture hot spot is believed Breath is uniform resource position mark URL;
Custom feature execution module passes through the execution foot in the webpage when the judging result of the judgment module is to be This, obtains the identification information of the custom feature in the attribute information of the picture hot spot, is searched by the perform script pre- Function file corresponding to the identification information of the custom feature first configured, and execute and wrapped in the function file found The code contained;
Jump module, when the judging result of the judgment module is no, according to the URL in the attribute information of the picture hot spot It is redirected.
CN201410080918.1A 2014-03-06 2014-03-06 A kind of implementation method and device of custom feature Active CN104899217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410080918.1A CN104899217B (en) 2014-03-06 2014-03-06 A kind of implementation method and device of custom feature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410080918.1A CN104899217B (en) 2014-03-06 2014-03-06 A kind of implementation method and device of custom feature

Publications (2)

Publication Number Publication Date
CN104899217A CN104899217A (en) 2015-09-09
CN104899217B true CN104899217B (en) 2018-09-25

Family

ID=54031884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410080918.1A Active CN104899217B (en) 2014-03-06 2014-03-06 A kind of implementation method and device of custom feature

Country Status (1)

Country Link
CN (1) CN104899217B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106055721A (en) * 2016-07-15 2016-10-26 深圳市联谛信息无障碍有限责任公司 Accessible webpage processing method and relevant equipment
CN106326396B (en) * 2016-08-19 2019-08-23 武汉斗鱼网络科技有限公司 The method and system of page jump are realized in mobile client using customized URL
CN106951248B (en) * 2017-03-16 2020-09-18 网易(杭州)网络有限公司 Method and device for adding codes, readable storage medium and computing equipment
CN109697267B (en) * 2018-12-12 2021-02-23 西安四叶草信息技术有限公司 CMS (content management system) identification method and device
CN113407878B (en) * 2021-08-18 2022-02-08 深圳市明源云客电子商务有限公司 Page adaptation method, display terminal and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010016173A (en) * 2000-11-18 2001-03-05 오근수 Method for sharing the screen on the web using the input message
CN102957663A (en) * 2011-08-17 2013-03-06 阿里巴巴集团控股有限公司 Method, system and device for providing commodity information
CN103139204A (en) * 2012-12-19 2013-06-05 姚爱军 Network identifying code method and system
CN103605449A (en) * 2013-11-08 2014-02-26 深圳Tcl新技术有限公司 Static page interaction method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7636766B2 (en) * 2005-11-15 2009-12-22 Yahoo! Inc. Remote selection and installation of auxiliary content
US20080126515A1 (en) * 2006-03-16 2008-05-29 Gary Clark Chambers Advertising content management system and method
CN101676848A (en) * 2008-09-19 2010-03-24 三星电子株式会社 Device and method for identifying and processing image information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010016173A (en) * 2000-11-18 2001-03-05 오근수 Method for sharing the screen on the web using the input message
CN102957663A (en) * 2011-08-17 2013-03-06 阿里巴巴集团控股有限公司 Method, system and device for providing commodity information
CN103139204A (en) * 2012-12-19 2013-06-05 姚爱军 Network identifying code method and system
CN103605449A (en) * 2013-11-08 2014-02-26 深圳Tcl新技术有限公司 Static page interaction method and device

Also Published As

Publication number Publication date
CN104899217A (en) 2015-09-09

Similar Documents

Publication Publication Date Title
US10699061B2 (en) Application page quick access
US9703883B2 (en) Social bookmarking of resources exposed in web pages
CN102567516B (en) Script loading method and device
TWI703463B (en) Information display method, device and intelligent terminal
CN110069683B (en) Method and device for crawling data based on browser
CN104899217B (en) A kind of implementation method and device of custom feature
CN104239298B (en) Text message recommends method, server, browser and system
US20080215997A1 (en) Webpage block tracking gadget
WO2011032815A1 (en) Analyzing an interaction history to generate a customized webpage
CN106126693A (en) The sending method of the related data of a kind of webpage and device
US20220114269A1 (en) Page processing method, electronic apparatus and non-transitory computer-readable storage medium
CN110275705A (en) Generate method, apparatus, equipment and the storage medium for preloading page code
CN102591916A (en) Webpage opening method and website system
US9465814B2 (en) Annotating search results with images
CN104809173A (en) Search result processing method and device
TWI519980B (en) Method and device for displaying web page and computer-readable storage medium
CN110968314A (en) Page generation method and device
CN102521373A (en) Method for cross-site search and website system for same
CN104268246A (en) Method for generating instruction script for visiting websites and visiting method and device
US20180059887A1 (en) Direct navigation to modal dialogs
CN104572753A (en) Bookmark storage method and bookmark storage device
CN103955548B (en) A kind of webpage rendering intent and device
JP6464031B2 (en) Electronic device, web page display method, and web page display program
US20160299985A1 (en) Method for accessing last search
KR20160132854A (en) Asset collection service through capture of content

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191205

Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, ky1-1205, Cayman Islands

Patentee after: Innovative advanced technology Co., Ltd

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Co., Ltd.