CN102236546B - 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
CN102236546B
CN102236546B CN201010163258.5A CN201010163258A CN102236546B CN 102236546 B CN102236546 B CN 102236546B CN 201010163258 A CN201010163258 A CN 201010163258A CN 102236546 B CN102236546 B CN 102236546B
Authority
CN
China
Prior art keywords
script
target web
carry out
search
webpage
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.)
Expired - Fee Related
Application number
CN201010163258.5A
Other languages
Chinese (zh)
Other versions
CN102236546A (en
Inventor
邱全成
方慧
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 interactive element to carry out system and the method thereof of corresponding script
Technical field
Script execution system and a method thereof, refer to that a kind of interactive element of searching is to carry out system and the method thereof of corresponding script especially.
Background technology
When exploitation webpage, often all needing to rely on many personnel with professional knowledge and technology uses specific application software to carry out on computers the editor of webpage, after webpage completes editor, then by developer, webpage is uploaded to the server that website service is provided.
Early stage webpage is mainly by HTML (Hypertext Markup Language) (HyperText Markup Language, HTML) grammer and script (script) form, the developer of webpage is programmer mostly, but recently due to style sheet (CSS) in webpage by a large amount of uses, therefore the developer of webpage, except programmer, has also increased the visual designer completely not identical with programmer's professional domain.Therefore, the flow process of webpage development is normally made after the webpage that has added pattern grammer by visual designer at present, transfers to programmer in this webpage, to write to browser and the program of carrying out on to server.
But, due in the process of webpage development, the picture that webpage presents and the constantly adjustment of function that operation is provided, in addition, because the source code of webpage is not by same person editor, but by visual designer and programmer's joint development, therefore, after visual designer and programmer carry out editor again and again to the source code of webpage, the source code of webpage can be more and more mixed and disorderly, under these circumstances, once the picture that webpage will present or the complexity of procedure code improve, 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 webpage, and programmer is also difficult for revising the script in webpage.In addition, because visual designer is unfamiliar with script grammer conventionally, programmer may be unfamiliar with pattern grammer, so, when visual designer and programmer are when revising the source code of webpage, often dare not delete unfamiliar script grammer or pattern grammer, so by easily causing in the source code of webpage, occur unnecessary script grammer or pattern grammer.
In sum, since known prior art is medium-term and long-term, there is the webpage source code easy care and easily occur the problem of unnecessary grammer not simultaneously comprise HTML grammer, pattern grammer and script grammer always, 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 easily occur the problem of unnecessary grammer not comprise HTML grammer, pattern grammer and script grammer in prior art simultaneously, so the present invention discloses a kind of interactive element of searching to carry out system and the method thereof of corresponding script, wherein:
Search interactive element disclosed in this invention, to carry out the system of corresponding script, at least comprises: load module; Webpage insmods, and in order to be written into the target web that comprises at least one script function, does not comprise script grammer in the label of target web; Web Page Processing module, in order to the script according in target web, produce element and search unit and script executing unit, element is searched unit and is used to search in target web and comprises the element that is transfused to the interactive event that module triggers, and script executing unit is in order to be used element carry out the script function of corresponding interactive event and produce execution result; Display module, in order to the display web page loaded target web that insmods, and in order to according to 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 unit; Interactive event is that cursor movement to element, cursor shifts out element, cursor is clicked element; Execution result is the show or hide of content and/or the change of attribute of an element of 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 link of the function shelves that record script function, and webpage insmods and more in order to the link according to function shelves, is written into function shelves; Target web also can comprise the link of the pattern shelves of the pattern grammer that record uses, and webpage insmods more in order to the link load style shelves according to pattern shelves.
Search interactive element disclosed in this invention is to carry out the method for corresponding script, and its step at least comprises: be written into the target web that comprises at least one script function, do not comprise script grammer in the label of target web; Display-object webpage; Trigger the interactive event that the element in target web comprises; In target web, search element; Use element to carry out the script function corresponding with interactive event, so as to producing execution result; 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 target web, record the link of function shelves, be written into the step of the function shelves that comprise script function, or comprise according in target web, record the link of pattern shelves, be written into the step of the pattern shelves that comprise pattern grammer.
Search interactive element disclosed in this invention is to carry out the method for corresponding script, and wherein, the step that changes display-object webpage according to execution result is the content of show or hide element and/or shows the attribute of an element being changed by execution result.
System and method for disclosed in this invention as above, and the difference between prior art is that the present invention passes through addition element in target web and searches unit, after interactive event in target web is triggered, element is searched unit can hunt out the element that comprises the interactive event being triggered, the script grammer corresponding with interactive event is performed, so as to solving the existing problem of prior art, and can reach the technology effect that improves the efficiency of developing/safeguard webpage and procedure code.
Accompanying drawing explanation
Fig. 1 is that the search interactive element carried of the present invention is to carry out the system architecture diagram of corresponding script.
Fig. 2 is that the search interactive element carried of the present invention is to carry out the method flow diagram of corresponding script.
Fig. 3 A is the part source code schematic diagram of the target web carried of the embodiment of the present invention.
Fig. 3 B is the script schematic diagram that the embodiment of the present invention is carried.
[main element symbol description]
100 browser 110 webpages insmod
120 load module 130 Web Page Processing modules
132 element search module 136 script execution module
140 display module 301 target webs
302 script 330 elements
381 script grammer 382 script grammers
400 Storage Medias
Embodiment
Below will coordinate graphic and embodiment to describe 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 easily the applied technological means of technical solution problem of the present invention and implement according to this, realizes whereby the attainable effect of the present invention.
The present invention is that in target web, add can be after interactive event occurs, in automatic searching target web, produce the script of the element (element) of interactive event, make to change in the show state of element or the target web of content with script, can can be separated with the script being performed by being used for specially HTML grammer and pattern (CSS) grammer of display web page element, and do not need to be mixed in same place, do not write.That is to say, use the present invention, can not comprise any script grammer so that be used for describing the label of each element of target web, facilitate visual designer to set up and modifying target webpage.Wherein, the script that the present invention carries, is the set of the particular script grammer in target web, can or be comprised of one or more script grammers and one or more script function a plurality of script grammers, one or more script function; The script function that the present invention carries is comprised of a plurality of script grammers, and it can reach specific function.
The interactive event that the present invention carries triggers for user can operate cursor the event that the element in target web comprises, onmouseover () event, the cursor triggering such as cursor movement to element shifts out element onmouseout () event, cursor is clicked element onclick () event etc., but the present invention is not as limit.
The search interactive element that following elder generation is carried with Fig. 1 the present invention illustrates System Operation of the present invention to carry out the system architecture diagram of corresponding script.As shown in Figure 1, system applies of the present invention, in the browser 100 of webpage, wherein comprises that webpage insmods 110, load module 120, Web Page Processing module 130 and display module 140.
Webpage insmods and 110 is responsible for being written into target web, wherein, by webpage 110 target webs that are written into that insmod, is stored in the device of carrying out browser 100, 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 the different piece at archives by HTML grammer and pattern grammer and script grammer, in the case, HTML grammer in target web and pattern grammer and script grammer have significantly and separate, and do not have the grammer being mingled with.Target web also can be for comprising the archives of the link with the HTML grammer of pattern title, the link of function shelves and pattern shelves, webpage insmods 110 meetings after being written into target web, according to the link of function shelves and the link of pattern shelves, to Storage Media 400, read the function shelves that record script function and the pattern shelves that record pattern grammer, so as to completing being written into of target web.
Load module 120 is responsible for providing the interactive event that in triggering target web, a certain element comprises.Generally speaking, the viewer that load module 120 is to provide target web operates cursor and moves and click, and shifts out element, cursor is clicked the interactive event such as element so as to triggering cursor movement to element, cursor.
Web Page Processing module 130 is responsible for producing element according to the script in target web and is searched unit 132 and script executing unit 136, so as to the corresponding script of interactive event in target web can normally be carried out.
Element is searched unit 132 and is responsible for to search in target web and comprises the element that is transfused to the interactive event that module 120 triggers.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 target web, therefore, element is searched unit 132 can use for XML path language (XML Path Language, XPath) iterator and/or CSS iterator etc. the element of similar techniques.
Script executing unit 136 is responsible for using element to search the element that comprises the interactive event the being triggered execution script corresponding with the interactive event being triggered that unit 132 hunts out, by script executing unit 136 execution scripts, be generally the form of function, but the present invention is not as limit.Wherein, if target web records in the mode linking the function shelves that comprise script function, the script function corresponding with the interactive event being triggered can be recorded in function shelves conventionally, but the present invention is not also as limit.
Script executing unit 136, after carrying out the script corresponding with the interactive event being triggered, can produce corresponding execution result.The execution result that script executing unit 136 produces is the show or hide of the content of the one or more elements in target web, and/or the change of the one or more attributes of an element (attribute) in target web, but the present invention is not as limit.Wherein, the element that content is shown or is hidden is the element such as " <div ... > ... </div> ", " <li ... > ... </li> " for example, 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 ... ></a> etc., reformed attribute can be picture path, coupling position, pattern grammer, data content etc., and the present invention is not as limit.
Display module 140 is responsible for each label insmoding in 110 loaded target webs according to webpage, each element of target web is presented in browser 100, display module 140 is also responsible for the execution result producing according to script executing unit, the show state of each element of change display-object webpage or shown data content.
Then with an embodiment, explain orally operation system of the present invention and method, and please refer to search interactive element that Fig. 2 the present invention puies forward to carry out the method flow diagram of corresponding script.
When viewer's wish is used browser 100 browsing objective webpage 301, viewer understands webpage in 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, target web 301 will be as shown in Figure 3A, at " <ul ... > ... </ul> " " <li ... > ... </li> ", " <div ... > ... </div> ", " <span ... > ... </span> ", simple HTML grammers such as " <a href=... > ... </a> ", and " class=" ... " ", " style=" ... pattern grammers such as " ", and do not comprise any script grammer.Wherein, if target web 301 does not directly comprise pattern grammer/script grammer, but comprise, be attached to the pattern shelves/script files that records pattern grammer/script grammer, webpage insmod 110 can comprise according to target web 301 the link of pattern shelves/script files, download pattern shelves/script files, so as to the pattern grammer/script grammer in load style shelves/script files.
At webpage, insmod and 110 be written into after target web 301 (step 210), display module 140 can demonstrate target web 301 (step 220) in the user interface of browser 100, makes load module 120 provide user to operate the interactive event (step 230) that cursor triggers certain element in target web 301.In the present embodiment, suppose that the interactive event being triggered is that cursor movement is to element, when user is when by load module 120, by cursor movement, to element 330, on the user interface at browser 100, the object (object) of representative is upper, the interactive event that element 330 comprises is triggered.
Afterwards, the element in Web Page Processing module 130 is searched unit 132 and can in target web 301, be searched the element (step 250) that comprises the interactive event being triggered.In the present invention, suppose that element searches unit 132 for " XPath iterator ", element is searched unit 132 can to search smoothly the element that comprises the interactive event being triggered is element 330.
Element in Web Page Processing module 130 is searched unit 132 and in target web 301, is searched after the element (step 250) that comprises the interactive event being triggered, script executing unit 136 in Web Page 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 as shown in Figure 3 B, when element 330 content when interactive event is triggered is demonstration (visible), script executing unit 136 can be carried out the script grammer 381 in script 302, so, the content that the hiding element 330 of script executing unit 136 meeting generation comprises and the execution result of changing the picture of a certain picture element in target web 301; And if element 330 content when interactive event is triggered is hiding (hide), script executing unit 136 can be carried out the script grammer 382 in script 302, so, the content that script executing unit 136 meeting generation display elements 330 comprise and the execution result of changing the picture of a certain picture element in target web 301.
Script executing unit 136 in Web Page Processing module 130 is carried out the script function corresponding with the interactive event being triggered and is produced after execution result (step 260), and display module 140 can execution result change display-object webpage.In the present embodiment, the execution result that namely display module 140 can produce according to script executing unit 136 is hidden or the content of display element 330, and to change the element that Shows Picture be corresponding picture.So, the script in target web 301 can separate and write with HTML grammer and pattern grammer, and reaches same display effect.
In sum, difference between known the present invention and prior art is to have addition element in target web and searches unit, after interactive event in target web is triggered, element is searched unit can hunt out the element that comprises the interactive event being triggered, the technological means that the script grammer corresponding with interactive event is performed, by this technological means, can solve the existing HTML grammer that simultaneously comprises of prior art, the webpage source code of pattern grammer and script grammer is easy care and easily occur the problem of unnecessary grammer not, and then reach the technology effect that improves the efficiency develop/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, with centralized system, realize or intersperse among with different elements the dispersing mode of the computer system of some interconnection and realize.
Although embodiment disclosed in this invention as above, just described content is not in order to direct restriction scope of patent protection of the present invention.Any persond having ordinary knowledge in the technical field of the present invention, is not departing under the prerequisite of spirit and scope disclosed in this invention, to doing a little change retouching in the formal and details of enforcement of the present invention, all belongs 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 a system for corresponding script, be applied to a browser, it is characterized in that, this system at least comprises:
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 script grammer in the label of this target web;
One Web Page Processing module, produces the following units in order to all script grammers according in this target web:
One element is searched unit, is used to the element that in this target web, search comprises the interactive event being triggered by this load module; And
One script executing unit, in order to use this element to carry out this script function that should interactive event, and produces 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, to carry out the system of corresponding script, is characterized in that, wherein this element search unit is XML path language iterator and/or 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 link of function shelves that record those script function, and this webpage insmods more in order to be written into this function shelves according to this link.
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 link of pattern shelves of the pattern grammer that record uses, and this webpage insmods more in order to be written into this pattern shelves according to this link.
5. search interactive element as claimed in claim 1, to carry out the system of corresponding script, is characterized in that, wherein this interactive event is that cursor movement to this element, cursor shifts out this element, cursor is clicked this element.
6. search interactive element as claimed in claim 1, to carry out the system of corresponding script, is characterized in that, the show or hide of content that wherein this execution result is this element and/or the change of this attribute of an element.
7. search interactive element to carry out a method for corresponding script, be applied to a browser, it is characterized in that, the method at least comprises the following step:
Be written into a target web that comprises at least one script function, in the label of this target web, do not comprise script grammer;
Show this target web;
Trigger the interactive event that the element in this target web comprises;
In this target web, search this element;
Use this element to carry out this script function corresponding with this interactive event, so as to producing an execution result; And
According to this execution result change, show this target web.
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 this at least one script function comprises according in this target web, record the link of function shelves, be written into the step of these function shelves that comprise this at least one 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 this at least one script function comprises according in this target web, record the link of pattern shelves, be written into the step of these pattern shelves that comprise pattern grammer.
10. search interactive element as claimed in claim 7 is to carry out the method for corresponding script, it is characterized in that, wherein this shows that according to this execution result change the step of this target web is the content of this element of show or hide and/or shows this attribute of an element being changed by 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 CN102236546A (en) 2011-11-09
CN102236546B true 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)

Families Citing this family (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 (2)

* 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
CN101515300A (en) * 2009-04-02 2009-08-26 阿里巴巴集团控股有限公司 Method and system for grabbing Ajax webpage content

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8041763B2 (en) * 2007-06-12 2011-10-18 International Business Machines Corporation Method and system for providing sharable bookmarking of web pages consisting of dynamic content

Patent Citations (2)

* 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
CN101515300A (en) * 2009-04-02 2009-08-26 阿里巴巴集团控股有限公司 Method and system for grabbing Ajax webpage content

Also Published As

Publication number Publication date
CN102236546A (en) 2011-11-09

Similar Documents

Publication Publication Date Title
Hemel et al. Declaratively programming the mobile web with Mobl
Palanque et al. Formal methods in Human-computer interaction
Powell et al. Web site engineering: beyond Web page design
Pont Embedded C
CN101887370B (en) Method and device for creating system user interface
MacDonald et al. Pro Asp. Net 3.5 In C# 2008 3Rd Ed: Includes Silverlight 2
Anderson et al. Pro business applications with silverlight 4
CN113849718A (en) Internet tobacco science and technology information automatic acquisition device, method and storage medium
Gassner Flash Builder 4 and Flex 4 Bible
US11010140B2 (en) Integration of workflow and logical data objects using visual programming
CN102236546B (en) System and method for executing corresponding script by searching interactive elements
Hayakawa et al. Maintaining web applications by translating among different RIA technologies
KR101730070B1 (en) Method for providing webpage in SaaS ENVIRONMENT, Computer program for the same, and Recording medium storing computer program for the same
Rizzo et al. Professional SharePoint 2010 Development
Tanaka et al. Meme media for clipping and combining web resources
Daniel et al. The interactive API (iAPI)
US20110131512A1 (en) Updateable running application
Magoulès et al. Visualization of large data sets by mixing Tcl and C++ interfaces to the VTK library
Jakupov Development of a web-based application for automated energy management system
Esposito et al. Reactive Programming for. NET Developers
McCune et al. Adobe Flex 3.0 for Dummies
Mandel et al. Extending UML to Model Hypermedia and Distributed Systems
Zheng Evaluation of the RIA Technology Macromedia Flex for User-Centered Social Software
Lorenz ASP. NET 2.0 Revealed
Kumar et al. Windows 10 Development Recipes: A Problem-Solution Approach in HTML and JavaScript

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