CN105528426B - A kind of URL parameter dynamically recording loading method of no refreshing - Google Patents

A kind of URL parameter dynamically recording loading method of no refreshing Download PDF

Info

Publication number
CN105528426B
CN105528426B CN201510903749.1A CN201510903749A CN105528426B CN 105528426 B CN105528426 B CN 105528426B CN 201510903749 A CN201510903749 A CN 201510903749A CN 105528426 B CN105528426 B CN 105528426B
Authority
CN
China
Prior art keywords
url
hash
location
user
interface
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
CN201510903749.1A
Other languages
Chinese (zh)
Other versions
CN105528426A (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.)
Zhongke Ruitong Technology Co., Ltd
Original Assignee
G Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201510903749.1A priority Critical patent/CN105528426B/en
Publication of CN105528426A publication Critical patent/CN105528426A/en
Application granted granted Critical
Publication of CN105528426B publication Critical patent/CN105528426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Abstract

The present invention relates to front end development technique field, the URL parameter dynamically recording loading method of especially a kind of no refreshing.The present invention is to write oracle listener using javascript, record is carried out and by result dynamically recording in URL to crucial operation, it is dynamically modified by the object of location.hash, using the form dynamically recording of #param1=value1=value2 in URL;Front end URL of the parsing with operating parameter simultaneously reappears operation interface, and user is allow easily to share current operation interface.The present invention provides a kind of good intuitive interface sharing methods;It can be used for the sharing of user interface.

Description

A kind of URL parameter dynamically recording loading method of no refreshing
Technical field
The present invention relates to front end development technique field, the URL parameter dynamically recording of especially a kind of no refreshing is loaded Method.
Background technique
The development of software and hardware and front-end technology in recent years, for meet the good interface alternation demand of user it is various with Front end is that the rich application program of center of gravity continuously emerges.The characteristics of this rich application is good interaction response, and interface is using asynchronous Local hydrodynamic unit form (only update the part of user's operation, remaining certain customers can continue normal browsing, that is, Ajax technology), usually using using javascript as the response mode of center of gravity.
Many scene users need the interface to other user's sharing operations interface, and traditional mode is by a system Screenshot is carried out to final operating result after the operation of column and is shared with other users, other users can not from static picture The enjoyment that rich application program interactive mode brings him is obtained, and he can not obtain other letters other than current operation result Breath.
Therefore, a kind of user embodies good intuitive interface sharing method and seems very necessary.
Summary of the invention
Present invention solves the technical problem that being to provide a kind of method of the URL parameter dynamically recording load of no refreshing;Have Effect solves the problem above-mentioned, and provides a kind of user's embodiment good intuitive interface sharing method.
The technical solution that the present invention solves above-mentioned technical problem is:
The method is to write oracle listener using javascript, record and move result to crucial operation State is recorded in URL, is dynamically modified by the object of location.hash, is used #param1=value1&param2= The form dynamically recording of value2 is in URL;Front end URL of the parsing with operating parameter simultaneously reappears operation interface, allows user Easily share current operation interface.
The method at the parsing URL reproduction process interface of the method is:
Code is write using javascript, page loaded obtains location.hash character string and is parsed into Json data reappear interface according to json data.
User's operation process is:
User A accesses rich application program in environment A and has carried out several operations, and user A will have recorded current behaviour The URL for making state is shared with user B, and user B directly accesses rich application program, Fu Yingyong using the URL that A is provided in environment B Program can reappear the operating result of A to B according to parameter.
The specific implementation flow of the method is:
The first step writes parsing and the logic of location.hash is arranged:
Resolution logic: if location.hash is not sky, json form is converted by location.hash;
Logic is arranged: there is no the values in the json data of hash, then are added in json;It, will in the presence of then assignment again Json changes into the form of location.hash, and changes location.hash;
Second step writes reference record program: corresponding event monitoring is write in needing the operation recorded, user is actively Corresponding event is triggered, then the value of location.hash is arranged in the parsing setting logic write using the first step;
Third step writes state reduction logic: in page loaded, if accessing this program using the URL with anchor point The parsing code analysis then write using the first step restores interface according to current json data at json data.
The present invention uses the form without refreshing by the operation note of user in URL in front end, and user can easily share Current operation interface gives other people, and front end URL of the parsing with operating parameter simultaneously reappears operation interface, can easily share boundary Face.Present invention is especially suited for the rich applications for paying attention to user's embodiment, such as the fields such as the interaction of AJAX request data, map and chart interaction It closes.User can be recorded in URL anchor point the operation of front-end interface, and complete URL need to be only shared with other uses by user Person, so that it may realize and share interface.
Detailed description of the invention
The following further describes the present invention with reference to the drawings:
Fig. 1 is detailed process of the present invention.
Specific embodiment
As shown in Figure 1, the specific embodiment of the invention is as follows:
The first step writes parsing and the logic of location.hash is arranged:
Resolution logic: if location.hash is not sky, json form, code are converted by location.hash It is as follows:
Logic is arranged: there is no the values in the json data of hash, then are added in json, there is then assignment again, will Json changes into the form of location.hash, and changes location.hash, and code is as follows:
Second step writes reference record program: corresponding event monitoring is write in needing the operation recorded, user is actively Corresponding event is triggered, then the value of location.hash is arranged in the parsing setting logic write using the first step.Event monitoring Logic it is almost the same, the global variable of default is configured after user triggers corresponding event, is recalled unified Graphic hotsopt interface is presented interface, and only the event monitoring of service index selection illustrates that code is as follows below:
// monitor simultaneously record index selection
$(″.submenu a″).click(function(){
Cur_report=this.getAttribute (' report-index ');
loadData(cur_report,cur_area,cur_type);
});
Unified setting location.hash, code are as follows in the interface of graphic hotsopt:
Third step writes state reduction logic: in page loaded, if accessing this program using the URL with anchor point The parsing code analysis then write using the first step restores interface according to current json data, generation at json data Code is as follows:

Claims (3)

1. a kind of URL parameter dynamically recording loading method of no refreshing, it is characterised in that: the method be using Javascript writes oracle listener, carries out record and by result dynamically recording in URL to crucial operation, passes through The object of location.hash is dynamically modified, and the form dynamic of #param1=value1&param2=value2 is used to remember Record is in URL;Front end URL of the parsing with operating parameter simultaneously reappears operation interface, and user is allow easily to share current operation Interface;
The specific implementation flow of the method is:
The first step writes parsing and the logic of location.hash is arranged:
Resolution logic: if location.hash is not sky, json form is converted by location.hash;
Logic is arranged: there is no the values in the json data of hash, then are added in json;In the presence of then assignment again, by json The form of location.hash is changed into, and changes location.hash;
Second step writes reference record program: corresponding event monitoring is write in needing the operation recorded, user actively triggers The value of location.hash is arranged in corresponding event, then the parsing setting logic write using the first step;
Third step writes state reduction logic: in page loaded, making if accessing this program using the URL with anchor point The parsing code analysis write with the first step restores interface according to current json data at json data.
2. the URL parameter dynamically recording loading method of no refreshing according to claim 1, it is characterised in that: the method The method at parsing URL reproduction process interface be:
Code is write using javascript, page loaded obtains location.hash character string and is parsed into json number According to interface is reappeared according to json data.
3. the URL parameter dynamically recording loading method of no refreshing according to claim 1 or 2, it is characterised in that: Yong Hucao It is as process:
User A accesses rich application program in environment A and has carried out several operations, and user A will have recorded current operation shape The URL of state is shared with user B, and user B directly accesses rich application program, rich application program using the URL that A is provided in environment B The operating result of A can be reappeared to B according to parameter.
CN201510903749.1A 2015-12-09 2015-12-09 A kind of URL parameter dynamically recording loading method of no refreshing Active CN105528426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510903749.1A CN105528426B (en) 2015-12-09 2015-12-09 A kind of URL parameter dynamically recording loading method of no refreshing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510903749.1A CN105528426B (en) 2015-12-09 2015-12-09 A kind of URL parameter dynamically recording loading method of no refreshing

Publications (2)

Publication Number Publication Date
CN105528426A CN105528426A (en) 2016-04-27
CN105528426B true CN105528426B (en) 2019-03-26

Family

ID=55770649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510903749.1A Active CN105528426B (en) 2015-12-09 2015-12-09 A kind of URL parameter dynamically recording loading method of no refreshing

Country Status (1)

Country Link
CN (1) CN105528426B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605449A (en) * 2013-11-08 2014-02-26 深圳Tcl新技术有限公司 Static page interaction method and device
CN104410711A (en) * 2014-12-15 2015-03-11 北京国双科技有限公司 Cross-domain network resource request method and device for client
CN104850602A (en) * 2015-05-04 2015-08-19 微梦创科网络科技(中国)有限公司 Method and apparatus for rendering and refreshing based on Internet webpage

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013506175A (en) * 2009-09-25 2013-02-21 インターナショナル・ビジネス・マシーンズ・コーポレーション Management of application state information by unified resource identifier (URI)

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605449A (en) * 2013-11-08 2014-02-26 深圳Tcl新技术有限公司 Static page interaction method and device
CN104410711A (en) * 2014-12-15 2015-03-11 北京国双科技有限公司 Cross-domain network resource request method and device for client
CN104850602A (en) * 2015-05-04 2015-08-19 微梦创科网络科技(中国)有限公司 Method and apparatus for rendering and refreshing based on Internet webpage

Also Published As

Publication number Publication date
CN105528426A (en) 2016-04-27

Similar Documents

Publication Publication Date Title
US11012740B2 (en) Method, device, and storage medium for displaying a dynamic special effect
JP6480542B2 (en) Image panning and zooming effects
CN111294663B (en) Bullet screen processing method and device, electronic equipment and computer readable storage medium
CN110235120B (en) System and method for conversion between media content items
JP2019521547A (en) System and method for presenting content
KR20150126196A (en) Data processing apparatus and method for processing data based on user feeling
WO2019007327A1 (en) Video playback method and apparatus, computing device, and storage medium
US10831512B2 (en) Capturing user interactions
US11122332B2 (en) Selective video watching by analyzing user behavior and video content
KR20170047256A (en) Semantic card view
JP2019518259A (en) System and method for presenting content
KR20200037602A (en) Apparatus and method for selecting artificaial neural network
KR20240025543A (en) Interaction methods and apparatus, electronic devices and storage media
US20170364802A1 (en) System, method, and recording medium for expert recommendation while composing messages
JP2016517578A (en) Modifying component content in the user interface
US20180189554A1 (en) Systems and methods to present reactions to media content in a virtual environment
Hu et al. Hybrid three-dimensional representation based on panoramic images and three-dimensional models for a virtual museum: Data collection, model, and visualization
CN112596694A (en) Method and device for processing house source information
CN111124668A (en) Memory release method and device, storage medium and terminal
CN108475182A (en) Data processing method and electric terminal
US11689757B2 (en) Method and apparatus for providing video streams
US10348981B1 (en) Dynamic and contextual data replacement in video content
CN105528426B (en) A kind of URL parameter dynamically recording loading method of no refreshing
CN110088750B (en) Method and system for providing context function in static webpage
US9389830B2 (en) Combined multi-source input interface

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province

Applicant after: G-Cloud Technology Co., Ltd.

Address before: 523808 No. 14 Building, Songke Garden, Songshan Lake Science and Technology Industrial Park, Dongguan City, Guangdong Province

Applicant before: G-Cloud Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201120

Address after: No.9-1213, Liangli Third Street, East District, Tongzhou District, Beijing 100023

Patentee after: Zhongke Ruitong Technology Co., Ltd

Address before: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee before: G-CLOUD TECHNOLOGY Co.,Ltd.