CN102236546A - System and method for executing corresponding script by searching interactive elements - Google Patents

System and method for executing corresponding script by searching interactive elements Download PDF

Info

Publication number
CN102236546A
CN102236546A CN2010101632585A CN201010163258A CN102236546A CN 102236546 A CN102236546 A CN 102236546A CN 2010101632585 A CN2010101632585 A CN 2010101632585A CN 201010163258 A CN201010163258 A CN 201010163258A CN 102236546 A CN102236546 A CN 102236546A
Authority
CN
China
Prior art keywords
script
target web
webpage
search
carry out
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2010101632585A
Other languages
Chinese (zh)
Other versions
CN102236546B (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.)
Qiao Yanping
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CN201010163258.5A priority Critical patent/CN102236546B/en
Publication of CN102236546A publication Critical patent/CN102236546A/en
Application granted granted Critical
Publication of CN102236546B publication Critical patent/CN102236546B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a system and method for executing a corresponding script by searching interactive elements. In the technical means, an element searching unit is arranged in a target webpage and is used for searching out elements comprising triggered interactive events after the interactive events are triggered in the target webpage, so that script syntaxes corresponding to the interactive events are executed. Thus, HTML (Hypertext Markup Language) syntax and style syntax in the webpage can be separated from the script syntax, and the technical effect of increasing webpage and programming code development/maintenance efficiency is achieved.

Description

Search system and the method thereof of interactive element to carry out corresponding script
Technical field
A kind of script execution system and method thereof are meant a kind of system and the method thereof of interactive element to carry out corresponding script of searching especially.
Background technology
When the exploitation webpage, often all needing to rely on many personnel with professional knowledge and technology uses specific application software to carry out the editor of webpage on computers, after webpage is finished editor, webpage is uploaded to the server that website service is provided by the developer again.
Early stage webpage mainly is by HTML (Hypertext Markup Language) (HyperText Markup Language, HTML) grammer and script (script) are formed, the developer of webpage is the programmer mostly, but recently since style sheet (CSS) in webpage by a large amount of uses, therefore the developer of webpage has also increased and the complete visual designer inequality of programmer's professional domain except the programmer.Therefore, after the flow process of webpage development is normally made the webpage that has added the pattern grammer by visual designer at present, transfer to the programmer and in this webpage, write to browser and the program of carrying out on to server.
But, because in the process of webpage development, picture that webpage presented and the constantly adjustment of function that operation is provided, in addition, because the source code of webpage is not by same editor individual, but develop jointly by visual designer and programmer, therefore, when visual designer and programmer carry out again and again editor to the source code of webpage after, the source code of webpage can be more and more mixed and disorderly, under these circumstances, in case the complexity of picture that webpage will present or procedure code improves, it is more and more longer that the source code of webpage can become, to become increasingly complex, so, visual designer is difficult for revising the pattern grammer in the webpage, and the programmer also is difficult for revising scripts in web pages.In addition, because visual designer is unfamiliar with the script grammer usually, the programmer may be unfamiliar with the pattern grammer, so, when visual designer and programmer when revising the source code of webpage, often dare not delete unfamiliar script grammer or pattern grammer, so will cause easily to occur unnecessary script grammer or pattern grammer in the source code of webpage.
In sum, there has been the webpage source code easy care and occur the problem of unnecessary grammer easily not comprise HTML grammer, pattern grammer and script grammer simultaneously in prior art always since the midium or long term as can be known, therefore be necessary to propose improved technological means, solve this problem.
Summary of the invention
Because there is the webpage source code easy care and occur the problem of unnecessary grammer easily not comprise HTML grammer, pattern grammer and script grammer simultaneously in prior art, so the present invention discloses a kind of system and the method thereof of interactive element to carry out corresponding script of searching, wherein:
Search interactive element disclosed in this invention comprises: load module at least to carry out the system of corresponding script; Webpage insmods, and in order to be written into the target web that comprises at least one script function, does not comprise the script grammer in the label of target web; The webpage processing module, produce element in order to the script in the foundation target web and search unit and script executing unit, element is searched the unit and is used to search in the target web and comprises the element that is transfused to the interactive event that module triggers, and script executing unit is carried out the script function of corresponding interactive event and produced execution result in order to use element; Display module, in order to the display web page loaded target web that insmods, and in order to foundation execution result change display-object webpage.
Search interactive element disclosed in this invention is to carry out the system of corresponding script, and wherein, it is XML path language (XML Path Language, XPath) iterator and/or CSS iterator that element is searched the unit; Interactive event is that cursor moves to element, cursor shifts out element, cursor click element; Execution result is the show or hide of content of element and/or the change of attribute of an element.
Search interactive element disclosed in this invention is to carry out the system of corresponding script, and wherein, target web can also comprise the binding of the function shelves that write down script function, and the binding that webpage insmods more in order to foundation function shelves is written into the function shelves; Target web also can comprise the binding of the pattern shelves that write down employed pattern grammer, and webpage insmods more in order to the binding load style shelves of foundation pattern shelves.
Search interactive element disclosed in this invention is to carry out the method for corresponding script, and its step comprises at least: be written into the target web that comprises at least one script function, do not comprise the script grammer in the label of target web; The display-object webpage; Trigger the interactive event that element comprised in the target web; In target web, search element; Use element to carry out the script function corresponding, so as to producing execution result with interactive event; According to execution result change display-object webpage.
Search interactive element disclosed in this invention is to carry out the method for corresponding script, wherein, the step that is written into the target web that comprises script function can comprise according in the target web, the binding of record function shelves, be written into the step of the function shelves that comprise script function, or comprise according in the target web, write down the binding of pattern shelves, be written into the step of the pattern shelves that comprise the pattern grammer.
Search interactive element disclosed in this invention to be to carry out the method for corresponding script, wherein, is the content of show or hide element and/or shows attribute of an element by execution result changed according to the step of execution result change display-object webpage.
System and method for disclosed in this invention as above, and the difference between the prior art is that the present invention passes through addition element search unit in target web, after interactive event in target web is triggered, element is searched the unit can hunt out the element that comprises the interactive event that is triggered, make that the script grammer corresponding with interactive event is performed, so as to solution existing in prior technology problem, and can reach the technology effect that improves the efficient of developing/safeguard webpage and procedure code.
Description of drawings
Fig. 1 for search interactive element that the present invention carried to carry out the system architecture diagram of corresponding script.
Fig. 2 for search interactive element that the present invention carried to carry out the method flow diagram of corresponding script.
Fig. 3 A is the part source code synoptic diagram of the target web carried of the embodiment of the invention.
Fig. 3 B is the script synoptic diagram that the embodiment of the invention is carried.
[main element symbol description]
100 browsers, 110 webpages insmod
120 load modules, 130 webpage processing modules
132 element search module, 136 script execution module
140 display modules, 301 target webs
302 scripts, 330 elements
381 script grammers, 382 script grammers
400 Storage Medias
Embodiment
Below will cooperate graphic and embodiment describes feature of the present invention and embodiment in detail, content is enough to make any related art techniques person of haveing the knack of can fully understand the applied technological means of technical solution problem of the present invention easily and implements according to this, realizes the attainable effect of the present invention whereby.
The present invention is that adding can be after interactive event takes place in target web, automatically produce the script of the element (element) of interactive event in the searching target webpage, make and to change in the target web of the show state of element or content with script, can can separate with the script that is performed being used for the HTML grammer and pattern (CSS) grammer of display web page element specially, not write and do not need to be mixed in same place.That is to say, use the present invention, can not comprise any script grammer, make things convenient for visual designer to set up and the modifying target webpage so that be used for describing the label of each element of target web.Wherein, the script that the present invention carried is the set of the particular script grammer in the target web, can be formed by a plurality of script grammers, one or more script function or by one or more script grammers and one or more script function; The script function that the present invention carried then is made up of a plurality of script grammers, and it can reach specific function.
The interactive event that the present invention carried triggers the incident that element comprised in the target web for the user can operate cursor, for example cursor moves to that onmouseover () incident, the cursor that element triggers shifts out element onmouseout () incident, cursor is clicked element onclick () incident etc., but the present invention is not as limit.
Following elder generation illustrates System Operation of the present invention with the search interactive element that Fig. 1 the present invention is carried with the system architecture diagram of carrying out corresponding script.As shown in Figure 1, system applies of the present invention comprises wherein that webpage insmods 110, load module 120, webpage processing module 130 and display module 140 in the browser 100 of webpage.
Webpage insmods and 110 is responsible for being written into target web, wherein, is stored in the device of carrying out browser 100 by webpage 110 target webs that are written into that insmod, and generally speaking, the device of carrying out browser 100 can store target webs with Storage Media 400.
Webpage insmods 110 loaded target webs can be for writing HTML grammer and pattern grammer and script grammer the different piece at archives, in the case, HTML grammer in the target web and pattern grammer and script grammer have significantly and separate, and do not have the grammer that is mingled with.Target web also can be the archives of the binding of the binding that comprises HTML grammer with pattern title, function shelves and pattern shelves, webpage insmods 110 meetings after being written into target web, according to the binding of function shelves and the binding of pattern shelves, the pattern shelves of the function shelves of reading and recording script function and record pattern grammer to the Storage Media 400 are so as to finishing being written into of target web.
Load module 120 is responsible for providing the interactive event that a certain element comprised in the triggering target web.Generally speaking, the viewer that load module 120 provides target web operates cursor and moves and click, and moves to so as to triggering cursor that element, cursor shift out element, cursor is clicked interactive event such as element.
Webpage processing module 130 is responsible for producing element according to the script in the target web and is searched unit 132 and script executing unit 136, so as to the pairing script of interactive event in the target web can normally be carried out.
Element is searched unit 132 and is responsible for to search in the target web and comprises the element that is transfused to the interactive event that module 120 triggered.Element is searched the tree (tree) that unit 132 can be considered as target web data structure, and the node (node) of tree is the element in the target web, therefore, element is searched unit 132 can be XML path language (XML Path Language, XPath) element of use such as iterator and/or CSS iterator similar techniques.
Script executing unit 136 is responsible for using element to search the element execution script corresponding with the interactive event that is triggered that comprises the interactive event that is triggered that unit 132 is hunted out, be generally the form of function by script executing unit 136 execution scripts, but the present invention is not as limit.Wherein, if target web writes down the function shelves that comprise script function in the mode that links, then corresponding with the interactive event that is triggered script function can be recorded in the function shelves usually, but the present invention is not also as limit.
Script executing unit 136 can produce corresponding execution result after carrying out the script corresponding with the interactive event that is triggered.The execution result that script executing unit 136 is produced is the show or hide of the content of the one or more elements in the target web, and/or the change of the one or more attributes of an element (attribute) in the target web, but the present invention is not as limit.Wherein, the content element that is shown or is hidden for example "<div ...〉...</div ", "<li ...〉...</li " etc. element, but the present invention is not as limit; And the reformed element of attribute is including but not limited to picture element<img ..., link element<a ... the a of〉</〉 etc., reformed attribute can be picture path, coupling position, pattern grammer, data content etc., the present invention is not as limit.
Display module 140 is responsible for according to insmod each label in the 110 loaded target webs of webpage, each element of target web is presented in the browser 100, display module 140 also is responsible for according to the execution result that script executing unit produced, the show state of each element of change display-object webpage or the data content that is shown.
Then explain orally operation system of the present invention and method, and please refer to search interactive element that Fig. 2 the present invention put forward to carry out the method flow diagram of corresponding script with an embodiment.
When viewer's desire was used browser 100 browsing objective webpages 301, the viewer understood webpage in the operating browser 100 and insmods and 110 be written into target web 301 (step 210).In the present embodiment, hypothetical target webpage 301 is with concept development of the present invention, then target web 301 will be as shown in Figure 3A, at "<ul ...〉...</ul " "<li ...〉...</li ", "<div ...〉...</div〉", "<span ... ...</span〉", "<a href=... ...</a〉" etc. simple HTML grammer; and " class=" ... " ", " style=" ... " " wait the pattern grammer, and do not comprise any script grammer.Wherein, if target web 301 does not directly comprise pattern grammer/script grammer, but comprise the pattern shelves/script files that is attached to record pattern grammer/script grammer, the then webpage binding of the 110 pattern shelves/script files that can be comprised according to target web 301 that insmods, download pattern shelves/script files, so as to the grammer of the pattern in load style shelves/script files/script grammer.
Webpage insmod 110 be written into target web 301 (step 210) after, display module 140 can demonstrate target web 301 (step 220) in the user interface of browser 100, make load module 120 provide the user to operate the interactive event (step 230) that cursor triggers certain element in the target web 301.In the present embodiment, suppose that the interactive event that is triggered is that cursor moves on the element, when the object (object) that cursor is moved to representative on the user interface of element 330 at browser 100 by load module 120 as the user was gone up, the interactive event that element 330 is comprised was triggered.
Afterwards, the element in the webpage processing module 130 is searched unit 132 and can search the element (step 250) that comprises the interactive event that is triggered in target web 301.In the present invention, suppose that element searches unit 132 and be " XPath iterator ", then element is searched unit 132 can to search the element that comprises the interactive event that is triggered smoothly is element 330.
Element search unit 132 in webpage processing module 130 searches the element (step 250) that comprises the interactive event that is triggered in target web 301 after, script executing unit 136 in the webpage processing module 130 can be used by element and search the element execution script function corresponding with interactive event that unit 132 is hunted out, so as to producing execution result (step 260).In the present embodiment, suppose that script 302 in the script function corresponding with interactive event is shown in Fig. 3 B, then when element 330 when interactive event is triggered content for showing (visible), then script executing unit 136 can be carried out the script grammer 381 in the script 302, so, script executing unit 136 can produce and hide content that element 330 comprised and the execution result of changing the picture of a certain picture element in the target web 301; And if element 330 content when interactive event is triggered is hiding (hide), then script executing unit 136 can be carried out the script grammer 382 in the script 302, so, script executing unit 136 can produce content that display elements 330 are comprised and the execution result of changing the picture of a certain picture element in the target web 301.
Script executing unit 136 in webpage processing module 130 is carried out the script function corresponding with the interactive event that is triggered and after producing execution result (step 260), display module 140 can change the display-object webpages by execution results.In the present embodiment, just display module 140 can be hidden or the content of display element 330 according to the execution result that script executing unit 136 is produced, and to change the element that Shows Picture be corresponding picture.So, the script in the target web 301 promptly can separate with HTML grammer and pattern grammer to be write, and reaches same display effect.
In sum, difference between the present invention and the prior art is to have addition element search unit in target web as can be known, after interactive event in target web is triggered, element is searched the unit can hunt out the element that comprises the interactive event that is triggered, the technological means that the feasible script grammer corresponding with interactive event is performed, can solve the existing HTML grammer that comprises simultaneously of prior art by this technological means, the webpage source code of pattern grammer and script grammer is easy care and occur the problem of unnecessary grammer easily not, and then reaches the technology effect that improves the efficient of developing/safeguard webpage and procedure code.
Moreover, the element of searching when interactive event triggers of the present invention is to carry out the method for corresponding script, can be implemented in the combination of hardware, software or hardware and software, also can in computer system, realize or intersperse among the dispersing mode of the computer system of several interconnected and realize with different elements with centralized system.
Though embodiment disclosed in this invention is as above, be described content be not in order to direct qualification scope of patent protection of the present invention.Any persond having ordinary knowledge in the technical field of the present invention under the prerequisite that does not break away from spirit and scope disclosed in this invention, does a little change retouching to reaching of enforcement of the present invention in form on the details, all belong to scope of patent protection of the present invention.Scope of patent protection of the present invention, still must with appended claim the person of being defined be as the criterion.

Claims (10)

1. search interactive element to carry out the system of corresponding script for one kind, be applied to a browser, it is characterized in that this system comprises at least:
One load module;
One webpage insmods, and in order to be written into a target web that comprises at least one script function, does not comprise the script grammer in the label of this target web;
One webpage processing module, in order to produce the following units according to all the script grammers in this target web:
One element is searched the unit, is used to search in this target web an element that comprises an interactive event that is triggered by this load module; And
One script executing unit is carried out this script function that should interactive event in order to use this element, and is produced an execution result; And
One display module, in order to this target web that shows that this webpage insmods loaded, and in order to show this target web according to this execution result change.
2. search interactive element as claimed in claim 1 is characterized in that to carry out the system of corresponding script wherein this element search unit is XML path language (XML Path Language, XPath) iterator and/or a CSS iterator.
3. search interactive element as claimed in claim 1 is to carry out the system of corresponding script, it is characterized in that, wherein this target web more comprises a binding of function shelves that write down those script function, and this webpage insmods more in order to be written into this function shelves according to this binding.
4. search interactive element as claimed in claim 1 is to carry out the system of corresponding script, it is characterized in that, wherein this target web more comprises a binding of pattern shelves that write down employed pattern grammer, and this webpage insmods more in order to be written into this pattern shelves according to this binding.
5. search interactive element as claimed in claim 1 is characterized in that to carry out the system of corresponding script, and wherein this interactive event is that cursor moves to that this element, cursor shift out this element, cursor is clicked this element.
6. search interactive element as claimed in claim 1 is characterized in that to carry out the system of corresponding script, and wherein this execution result is the show or hide of content of this element and/or the change of this attribute of an element.
7. search interactive element to carry out the method for corresponding script for one kind, be applied to a browser, it is characterized in that this method comprises the following step at least:
Be written into a target web that comprises at least one script function, do not comprise the script grammer in the label of this target web;
Show this target web;
Trigger the interactive event that the element in this target web is comprised;
In this target web, search this element;
Use this element to carry out this script function corresponding, so as to producing an execution result with this interactive event; And
Show this target web according to this execution result change.
8. search interactive element as claimed in claim 7 is to carry out the method for corresponding script, it is characterized in that, wherein this step that is written into this target web that comprises those script function comprises according in this target web, write down the binding of function shelves, be written into the step of these function shelves that comprise those script function.
9. search interactive element as claimed in claim 7 is to carry out the method for corresponding script, it is characterized in that, wherein this step that is written into this target web that comprises those script function comprises according in this target web, write down the binding of pattern shelves, be written into the step of these pattern shelves that comprise those pattern grammers.
10. search interactive element as claimed in claim 7 is to carry out the method for corresponding script, it is characterized in that, wherein should show that step of this target web be the content of this element of show or hide and/or show this attribute of an element by this execution result changed according to the change of this execution result.
CN201010163258.5A 2010-04-30 2010-04-30 System and method for executing corresponding script by searching interactive elements Expired - Fee Related CN102236546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010163258.5A CN102236546B (en) 2010-04-30 2010-04-30 System and method for executing corresponding script by searching interactive elements

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010163258.5A CN102236546B (en) 2010-04-30 2010-04-30 System and method for executing corresponding script by searching interactive elements

Publications (2)

Publication Number Publication Date
CN102236546A true CN102236546A (en) 2011-11-09
CN102236546B CN102236546B (en) 2014-03-12

Family

ID=44887224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010163258.5A Expired - Fee Related CN102236546B (en) 2010-04-30 2010-04-30 System and method for executing corresponding script by searching interactive elements

Country Status (1)

Country Link
CN (1) CN102236546B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144651A (en) * 2018-08-27 2019-01-04 郑州云海信息技术有限公司 Hidden method, device, equipment and the medium of attribute information in a kind of schematic diagram

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808439A (en) * 2006-02-21 2006-07-26 西安迪戈科技有限责任公司 Method of adding searchable deep labels in web pages in conjunction with browser plug-ins and scripts
US20080313206A1 (en) * 2007-06-12 2008-12-18 Alexander Kordun Method and system for providing sharable bookmarking of web pages consisting of dynamic content
CN101515300A (en) * 2009-04-02 2009-08-26 阿里巴巴集团控股有限公司 Method and system for grabbing Ajax webpage content

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808439A (en) * 2006-02-21 2006-07-26 西安迪戈科技有限责任公司 Method of adding searchable deep labels in web pages in conjunction with browser plug-ins and scripts
US20080313206A1 (en) * 2007-06-12 2008-12-18 Alexander Kordun Method and system for providing sharable bookmarking of web pages consisting of dynamic content
CN101515300A (en) * 2009-04-02 2009-08-26 阿里巴巴集团控股有限公司 Method and system for grabbing Ajax webpage content

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144651A (en) * 2018-08-27 2019-01-04 郑州云海信息技术有限公司 Hidden method, device, equipment and the medium of attribute information in a kind of schematic diagram

Also Published As

Publication number Publication date
CN102236546B (en) 2014-03-12

Similar Documents

Publication Publication Date Title
Powell et al. Web site engineering: beyond Web page design
Pont Embedded C
US20160203115A1 (en) Intelligent text annotation
MacDonald et al. Pro ASP. NET 4 in VB 2010
CN101887370B (en) Method and device for creating system user interface
RU2595524C2 (en) Device and method for processing content of web resource in browser
Whiting et al. Creating an iPhone application for collecting continuous ABC data
Faden et al. Autoplot: A browser for scientific data on the web
US11314757B2 (en) Search results modulator
CN113849718A (en) Internet tobacco science and technology information automatic acquisition device, method and storage medium
Loudon Developing Large Web Applications: Producing Code That Can Grow and Thrive
US11010140B2 (en) Integration of workflow and logical data objects using visual programming
Wuyts et al. Unanticipated integration of development tools using the classification model
Yuan et al. JBoss seam: simplicity and power beyond Java EE
Rizzo et al. Professional SharePoint 2010 Development
CN102236546B (en) System and method for executing corresponding script by searching interactive elements
Tanaka et al. Meme media for clipping and combining web resources
Raffaillac et al. What do Researchers Need when Implementing Novel Interaction Techniques?
CN112527320B (en) Method, device and storage medium for deploying application system based on browser
Jakupov Development of a web-based application for automated energy management system
Hadlock jQuery Mobile: Develop and design
CN101976266A (en) Visualized media unit-based cloud computing search output architecture method
Paul Mastering Web Development with Miscrosoft Visual Studio 2005
Kumar et al. Windows 10 development recipes
Cazzulino et al. Beginning Visual Web Programming in VB. NET: From Novice to Professional

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Qiao Yanping

Inventor before: Qiu Quancheng

Inventor before: Fang Hui

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20171023

Address after: Room 1, unit 603, building 8, Lower East vegetable garden, Shiqiao District, Zhangjiakou, Hebei

Patentee after: Qiao Yanping

Address before: Taipei City, Taiwan, China

Patentee before: Inventec Corporation

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140312

Termination date: 20180430