WO2020006864A1 - Browser input box display method and apparatus, computer device, and storage medium - Google Patents

Browser input box display method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2020006864A1
WO2020006864A1 PCT/CN2018/105417 CN2018105417W WO2020006864A1 WO 2020006864 A1 WO2020006864 A1 WO 2020006864A1 CN 2018105417 W CN2018105417 W CN 2018105417W WO 2020006864 A1 WO2020006864 A1 WO 2020006864A1
Authority
WO
WIPO (PCT)
Prior art keywords
input box
placeholder
browser
function
style
Prior art date
Application number
PCT/CN2018/105417
Other languages
French (fr)
Chinese (zh)
Inventor
王建华
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020006864A1 publication Critical patent/WO2020006864A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present application relates to the technical field of browsers, and in particular, to a method, a device, a computer device, and a storage medium for displaying a browser input box.
  • ie kernel Internet Explorer
  • Chrome kernel there may be differences in kernel versions between the same kernels, such as ie kernel has ie9, ie10, ie11, etc.
  • a server when used as a data provider, such as a data provider for a web page, a user uses a client browser to access the server and load data of items on the server.
  • an input box that is, an input tag needs to be loaded.
  • browser kernels that cannot support HTML input placeholders, that is, do not support the placeholder function, which causes these client browsers to display styles and placeholder text normally when displaying input boxes. It is inconvenient for users to use and reduces the user experience.
  • a browser input box display method includes:
  • the browser does not support the placeholder function, when receiving a request to display an input box on the browser, the non-placeholder function required to generate the target item on the browser's display page is generated New input box;
  • the generated input box component has the same style, and the content of the elements in the line is consistent with the placeholder text of the input box component generated by using the placeholder function.
  • a browser input box display device includes:
  • a function detection module configured to detect whether the browser supports a placeholder function after the browser of the client loads the target item
  • An input box generating module is configured to generate a target item on a display page of a browser when a request for displaying an input box on the browser is received if a detection result of the function detection module is negative. New input box without placeholder function;
  • In-line element adding module is configured to add a preset in-line element at the position of the new input box, so as to simulate the new input box into an input box component with a placeholder function.
  • the style is consistent with the style of the input box component generated by using the placeholder function, and the content of the elements in the row is consistent with the placeholder text of the input box component generated by using the placeholder function.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, and the processor implements the browser input box when the processor executes the computer-readable instructions Demonstrate method steps.
  • One or more non-volatile readable storage media storing computer readable instructions, the computer readable storage medium storing computer readable instructions, so that the one or more processors execute the above browser input box display Method steps.
  • FIG. 1 is a schematic diagram of an application environment of a method for displaying a browser input box according to an embodiment of the present application
  • FIG. 2 is a flowchart of a browser input box display method according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of an application scenario step S101 of a browser input box display method according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of two input boxes on a login interface of a QQ program
  • FIG. 5 is a schematic flowchart of a method for displaying a browser input box in an embodiment of the present application to simulate a placeholder text effect in an application scenario
  • FIG. 6 is a schematic flowchart of a browser input box display method in another application scenario according to an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of an application scenario step S402 of a browser input box display method according to an embodiment of the present application
  • FIG. 8 is a schematic flowchart of a method for displaying a browser input box in an embodiment of the present application in which an historical record of style attributes is stored in an application scenario;
  • FIG. 9 is a schematic structural diagram of a browser input box display device according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a computer device according to an embodiment of the present application.
  • the browser input box display method provided in this application can be applied in the application environment shown in FIG. 1, in which a client communicates with a server through a network.
  • the client may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented by an independent server or a server cluster composed of multiple servers.
  • a method for displaying a browser input box is provided.
  • the method is applied to the server in FIG. 1 as an example, and includes the following steps:
  • step S101 After the client browser loads the target item, it is detected whether the browser supports a placeholder function, and if yes, step S102 is performed, and if not, step S103 is performed;
  • the server can detect the browser after loading the target project to detect whether the browser supports a placeholder function.
  • a custom component can be set by using code in the target project in advance. After the custom component is loaded by the browser, it will automatically perform a detection function to detect whether the browser supports a placeholder function.
  • the custom component can be a piece of code block, which can be implanted into different projects to implement the functions described in this method.
  • the custom component is developed based on the Vue.js framework (belonging to a front-end js framework) and is applicable to all decisions projects.
  • target item may specifically be webpage content, APP content, etc., which are carried on the server.
  • the step S101 may specifically include:
  • step S202 Determine whether the input box for testing has a placeholder attribute. If yes, go to step S203; if no, go to step S204;
  • step S201 it can be understood that in order to detect whether the browser supports the placeholder function, you can first try the placeholder function on the browser. If the placeholder function can be used normally, the newly created input box will inevitably bring There are placeholder attributes. Therefore, you can first create a test input box on the browser. It should be known that the newly-created input box for the test is generally established according to the needs of the target project. For example, if the content currently loaded by the target project is the user's login page, the login page needs to be displayed for the user Enter the input boxes for "Account” and "Password”. Then, during the test in step S201, a new input box for "Account” and / or "Password” can be created as the input box for testing.
  • step S202 it can be understood that if the browser supports the placeholder function, then the newly created test input box must have the placeholder attribute; otherwise, if the browser does not support the placeholder function Yes, then the newly created test input box will not have a placeholder attribute. Therefore, you can determine whether the browser supports the placeholder function by judging whether the newly created test input box has a placeholder attribute.
  • step S203 it can be known from the foregoing analysis that if the input box for testing has a placeholder attribute, it can be determined that the browser supports a placeholder function.
  • step S204 it can be known from the foregoing analysis that if the input box for testing does not have a placeholder attribute, it is determined that the browser does not support the placeholder function.
  • the server detects that the browser supports the placeholder function, when the input box needs to be displayed on the browser, such as loading a login page, the native placeholder function can be directly used in An input box component is generated on the display page of the browser.
  • the input box component mentioned here may include an input box body, and a placeholder attribute attached to the input box body.
  • the placeholder attribute may include a placeholder text, a placeholder position, a style, and the like.
  • the server detects that the browser does not support the placeholder function, this means that the placeholder function cannot be used on the browser, or the input box cannot be displayed normally by using the placeholder function. .
  • the non-accounting required for generating the target item on a browser display page New input box for token function.
  • step 103 should be to generate the new input box without the placeholder function according to the needs of the target project. For example, if the content currently loaded for the target project is a user's login page, the login page needs to display input boxes for the user to enter an "account” and "password”. Then, when generating the input boxes in step 103, the user needs to enter A new input box without a placeholder function is generated at the "Account” input position, and another new input box without a placeholder function is generated at the "Password” input position.
  • the in-line element refers to the in-line element in HTML. Because it does not need to occupy a line, it can be displayed at the same position as the new input box. Therefore, it can be simulated when the input box is overlapped with the input box. display effect.
  • the placeholder text in this embodiment refers to the information displayed in the input box when no content is input in the input box.
  • the prompt information displayed in gray is common, as shown in FIG. 4. See the two input boxes on the QQ login interface in Figure 4.
  • the input box located above is the input box for "Account”.
  • the placeholder text displayed on it is "QQ number / mobile phone / email ";
  • the input box at the bottom is the" password "input box, and the placeholder text displayed on it is” password "when the user has not entered anything.
  • the style of the element in the row refers to the presentation form of the input box, which includes a frame line, a pattern, a pattern, and the like that highlight the input box.
  • the style of the in-line element corresponding to the input box located above can be "penguin-shaped shadow pattern + underline + down arrow on the right side”; the style of the in-line element corresponding to the input box located above can be " Lock pattern + underline + keyboard icon on the right.
  • the placeholder text usually has the following characteristics: when there is no content in the input box, the placeholder text is displayed; when there is content in the input box, the placeholder is hidden text. Therefore, in order to make the in-line elements simulate this effect, referring to FIG. 5, after step S104, the method for displaying a browser input box may further include:
  • step S301 after adding inline elements to the new input box in step S104, from the display effect, placeholder text should be displayed on the new input box.
  • the server can listen to the new input box on the browser. The value of the input box, so that you can know whether there is a value on the new input box when the value changes, so that the content of the elements in the row can be adjusted according to the presence or absence of the value in the new input box. status.
  • step S302 if there is a value in the new input box, it means that there is content in the input box.
  • the content on the input box needs to be displayed. In order not to block the content displayed in the input box and simulate the placeholder text.
  • the content of the elements in the row can be adjusted to a hidden state. This hidden state means that when the content of the inline element is generated on the browser's page, it is not displayed and cannot be viewed by the user.
  • the opposite of the hidden state is the display state.
  • the content of the inline elements in the display state is generated on the page of the browser, it is displayed in the position of the input box according to a preset style, which the user can view.
  • the method may further include: if there is a value in the new input box, obtaining the current first state of the content of the element in the row; if the first state is a hidden state, no adjustment is performed. A state of the content of the element in the row; if the first state is a display state, adjusting the content of the element in the row to a hidden state. It can be understood that when the new input box has a value, it is necessary to obtain and determine whether the current state of the content of the element in the line is hidden or displayed. If it is hidden, it is obviously unnecessary to adjust the value. The state of the content of the element in the row; otherwise, the content of the element in the row needs to be adjusted to the hidden state.
  • step S303 if there is no value in the new input box, it means that there is no content in the input box.
  • the general characteristics of the placeholder text may be The content of the element is adjusted to the display state.
  • the method may further include: if there is no value in the new input box, obtaining a current second state of the content of the element in the row; if the second state is a display state, no adjustment is performed. A state of the content of the element in the row; if the second state is a hidden state, adjusting the content of the element in the row to a display state. It can be understood that when there is no value in the new input box, it is necessary to obtain and determine whether the current state of the content of the element in the row is hidden or displayed. If it is originally displayed, it is obviously unnecessary to adjust the value. The state of the content of the element in the row; otherwise, the content of the element in the row needs to be adjusted to the display state.
  • This embodiment executes the above steps S101 to S104, and a new problem may occur in a certain application scenario.
  • the user has been using the first version of the browser of a certain client.
  • the first version of the browser supports the placeholder function. Therefore, after loading the target project, the placeholder function is used to generate the input box component.
  • the style of the input box component Determined by the first version of the browser; however, the user later upgraded the client's browser, assuming the second version of the browser, the second version of the browser no longer supports the placeholder function, which requires this method Add an inline element to the input box position.
  • the problem is that the style displayed by adding inline elements on the second version of the browser is different from the style obtained by using the placeholder function in the first version of the browser. After this support status is switched, the styles are inconsistent. The situation is likely to be perceived by the user, which is not conducive to the user experience.
  • this embodiment addresses the above problems, and solves the following steps based on the above steps S101-S104.
  • the method may further include:
  • step S401 Determine whether the client browser supports the placeholder function when the target project was last loaded. If not, perform the above step S103, and if yes, perform step S402;
  • the method determines whether the browser of the client supports the placeholder function by determining whether the browser's browser last loaded the target item to support the placeholder function.
  • the switching of the support status mentioned here refers to the case where the client browser supported the placeholder function when the target project was last loaded, but did not support the placeholder function when the target project was loaded this time.
  • This implementation refers to this situation as support state switching. There are many possible reasons for switching the support status. It is common that the browser version of the client has changed. For example, after the version is upgraded, the old version that originally supported the placeholder function is upgraded to a new version that no longer supports the placeholder function. .
  • step S103 may be performed.
  • the server can obtain and record the client's ID (that is, the unique identifier), the browser version number, the placeholder style attribute used each time, and the item loaded each time when communicating with the client. Time, and store the correspondence between the client ID, browser version number, placeholder style attributes for each use, and time to load the item. Therefore, when it is determined that the client's browser last loaded the target item, it supports the placeholder function, that is, when the support status is switched, the server can obtain the client's browser's last load of the target item.
  • placeholder style attributes mentioned herein may include the color, font, font size, etc. of the placeholder style.
  • step S402 may specifically include:
  • style attribute history determines the loading time of the client's browser when the target item was last loaded.
  • the style attribute history records the loading time and the placeholder used each time the client loads the item.
  • a style attribute history can be established in advance, and the style attribute history records at least the correspondence between the loading time of the client each time the item is loaded and the placeholder style attribute used
  • the correspondence between the client's ID that is, the unique identifier
  • the browser version number that is, the browser version number
  • the placeholder style attribute for each use and the load time for each item loaded can also be specifically recorded.
  • step S502 after determining the loading time of the last time the target item is loaded, according to the corresponding relationship recorded in the style attribute history, it is possible to directly find the placeholder style attribute adopted by the client browser at the loading time.
  • the history history of the style attributes can be obtained in advance through the following steps:
  • step S601 it can be understood that each time when a client browser successfully loads an input box, whether using the method of the embodiment or the placeholder function, the text with the placeholder can be displayed. Input box. At this time, the server can intercept the loaded effect picture of the input box.
  • step S602 it can be known that, through the image recognition technology, attributes such as the color, font, and font size of the placeholder style on the input box can be identified from the effect picture.
  • steps S603 and S604 after obtaining the placeholder style attributes, in order to facilitate the subsequent search and acquisition by the server, it is necessary to obtain the loading time of the loaded project, and even obtain the client corresponding to the placeholder style attributes used this time.
  • the ID and the browser version number are then stored in association with each other to obtain the style attribute history.
  • step S403 is similar to the above step S103, and details are not described herein again.
  • step S404 it can be known that, in order to make the user still not notice that the placeholder style of the input box is changed when the support state is switched, it is necessary to simulate the effect of the placeholder style when the target item was last loaded. Therefore,
  • the server of this embodiment may add an inline element with a placeholder style attribute when the client browser loads the target item last time on the new input box position, and the content of the inline element and the use of the placeholder
  • the placeholder text of the input box component generated by the function is consistent. Therefore, in the display effect, the user cannot detect the visual difference of the input box before and after the two times, which avoids reducing the user experience due to the difference in the placeholder style of the input box. happensing.
  • the style of the inline element is controlled to make the style of the inline element consistent with the style of the input box component generated by the placeholder function, and the content of the inline element is the same as that of the input box component generated by the placeholder function.
  • the placeholder text is the same, users will not perceive that the placeholder function of the input box is unavailable.
  • the style and placeholder text of the input box can be displayed normally, making the server project compatible with all browser kernel versions of the client, avoiding The input box displays abnormal conditions, which improves the user experience.
  • a function detection module 701 configured to detect whether the browser supports a placeholder function after the client browser loads the target item
  • An input box generating module 702 is configured to generate a new input box without a placeholder function when a request for displaying an input box on the browser is received if the detection result of the function detection module is negative;
  • In-line element adding module 703 is configured to add a preset in-line element to the new input box position, and the style of the in-line element is consistent with the style of the input box component generated by using the placeholder function.
  • the content is consistent with the placeholder text of the input box component generated by the placeholder function.
  • the browser input box display device may further include:
  • a function judgment module configured to judge whether the client browser supports a placeholder function when the target project was last loaded
  • a first triggering module configured to trigger the input box generating module if the judgment result of the function judgment module is negative;
  • An attribute obtaining module configured to obtain a placeholder style attribute used when the browser of the client terminal loads the target item last time if the judgment result of the function judgment module is yes;
  • a first generating module configured to generate a new input box without a placeholder function when receiving a request to display the input box on the browser
  • An element adding module configured to add an in-line element with a placeholder style attribute used when the target item was last loaded on the new input box position generated by the first generating module, and the content and the adoption of the in-line element
  • the placeholder text generated by the placeholder function is consistent with the placeholder text.
  • the attribute obtaining module may specifically include:
  • a record query unit is used for querying the style attribute history to determine the loading time of the client's browser when the target item was last loaded, and the style attribute history records the loading time and the loading time of each time the client loads the item.
  • the style attribute history records the loading time and the loading time of each time the client loads the item.
  • An attribute determining unit configured to obtain a placeholder style attribute corresponding to the determined loading time according to the style attribute history
  • the style attribute history is obtained in advance through the following modules:
  • a picture interception module configured to intercept the loaded effect picture of the input box with placeholder text after the input box is successfully loaded each time the browser of the client loads the item;
  • An image recognition module configured to perform image recognition on the effect picture to obtain a placeholder style attribute on the input box
  • a loading time obtaining module configured to obtain a loading time of a project loaded by the browser of the client this time
  • An associative storage module is configured to associate and store the loading time and the obtained placeholder style attributes to obtain the style attribute history.
  • the function detection module may include:
  • An input box judging unit configured to determine whether the input box for testing has a placeholder attribute
  • a first determining unit configured to determine that the browser supports a placeholder function if the judgment result of the input box judgment unit is yes;
  • the second determining unit is configured to determine that the browser does not support a placeholder function if the judgment result of the input box judgment unit is no.
  • the browser input box display device may further include:
  • An input value monitoring module configured to monitor a value in the new input box
  • a hiding module configured to adjust the content of the element in the row to a hidden state if the input value monitoring module listens to a value in the new input box;
  • the display module is configured to adjust the content of the element in the row to a display state if the input value monitoring module monitors that there is no value in the new input box.
  • Each module in the browser input box display device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the hardware in or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 10.
  • the computer device includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in a non-volatile storage medium.
  • the database of the computer equipment is used to store data involved in the browser input box display method.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by a processor, a browser input box display method is implemented.
  • a computer device including a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor.
  • the processor executes the computer-readable instructions
  • the input box displays the steps of the method, such as step S101 to step S104 shown in FIG. 2.
  • the processor executes the computer-readable instructions
  • the functions of each module / unit of the browser input box display device in the foregoing embodiment are implemented, for example, the functions of modules 701 to 703 shown in FIG. 9. To avoid repetition, we will not repeat them here.
  • a computer-readable storage medium is provided, the one or more non-volatile storage mediums storing computer-readable instructions, and the computer-readable instructions are executed by one or more processors.
  • the steps of the browser input box display method in the foregoing method embodiment are implemented, or the one or more non-volatile readable storages storing computer-readable instructions Medium, when the computer-readable instructions are executed by one or more processors, causing the one or more processors to implement the computer-readable instructions to implement the functions of the modules / units in the browser input box display device in the above device embodiment. To avoid repetition, we will not repeat them here.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Abstract

A browser input box display method and apparatus, a computer device, and a storage medium, The present application is used to resolve the issue in which an input box cannot be properly displayed because some browsers do not support a placeholder function. The method comprises: after a browser of a client loads a target item, detecting whether the browser supports a placeholder function (S101); if not, generating, when a request to display an input box on the browser is received, a new input box on a display page of the browser that is required by the target item but does not have the placeholder function (S103); and adding a preset inline element to the position of the new input box, so as to simulate the new input box as an input box component having the placeholder function (S104), wherein the style of the inline element is consistent with that of an input box component generated by using the placeholder function, and the content of the inline element is consistent with placeholder text of the input box component generated by using the placeholder function.

Description

浏览器输入框展示方法、装置、计算机设备及存储介质Browser input box display method, device, computer equipment and storage medium
本申请以2018年07月06日提交的申请号为201810735637.3,名称为“浏览器输入框展示方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。This application is based on a Chinese invention patent application filed on July 06, 2018 with application number 201810735637.3, entitled "Browser Input Box Display Method, Device, Computer Equipment, and Storage Medium", and claims its priority.
技术领域Technical field
本申请涉及浏览器技术领域,尤其涉及浏览器输入框展示方法、装置、计算机设备及存储介质。The present application relates to the technical field of browsers, and in particular, to a method, a device, a computer device, and a storage medium for displaying a browser input box.
背景技术Background technique
不同客户端使用的浏览器可能各不相同,比如有些客户端浏览器采用ie(Internet Explorer)内核,有些客户端浏览器采用Chrome内核;并且,相同内核之间也会存在内核版本的差异,比如ie内核有ie9、ie10、ie11,等等。Browsers used by different clients may be different. For example, some client browsers use the ie (Internet Explorer) kernel, and some client browsers use the Chrome kernel. In addition, there may be differences in kernel versions between the same kernels, such as ie kernel has ie9, ie10, ie11, etc.
目前,当服务器作为数据提供端,比如网页的数据提供端,用户采用客户端浏览器访问服务器,加载服务器上项目的数据时,很多情况下需要加载输入框,即input标签。但是,存在部分浏览器内核无法支持HTML的input placeholder(输入占位符),即不支持占位符功能,这导致这些客户端浏览器在显示输入框时无法正常展示样式和占位符文本,不方便用户的使用,降低了用户的使用体验。At present, when a server is used as a data provider, such as a data provider for a web page, a user uses a client browser to access the server and load data of items on the server. In many cases, an input box, that is, an input tag needs to be loaded. However, there are some browser kernels that cannot support HTML input placeholders, that is, do not support the placeholder function, which causes these client browsers to display styles and placeholder text normally when displaying input boxes. It is inconvenient for users to use and reduces the user experience.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种可以提高服务器项目对所有浏览器内核版本的兼容性的浏览器输入框展示方法、装置、计算机设备及存储介质。Based on this, it is necessary to provide a browser input box display method, device, computer device, and storage medium that can improve the compatibility of a server project with all browser kernel versions in response to the above technical problems.
一种浏览器输入框展示方法,包括:A browser input box display method includes:
在客户端的浏览器加载目标项目后,检测所述浏览器是否支持占位符功能;After the client browser loads the target item, detecting whether the browser supports a placeholder function;
若所述浏览器不支持占位符功能,则当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;If the browser does not support the placeholder function, when receiving a request to display an input box on the browser, the non-placeholder function required to generate the target item on the browser's display page is generated New input box;
在所述新的输入框位置上添加预设的行内元素,以将所述新的输入框模拟成带占位符功能的输入框组件,其中,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。Adding a preset inline element on the new input box position to simulate the new input box as an input box component with a placeholder function, wherein the style of the inline element and the use of the placeholder function The generated input box component has the same style, and the content of the elements in the line is consistent with the placeholder text of the input box component generated by using the placeholder function.
一种浏览器输入框展示装置,包括:A browser input box display device includes:
功能检测模块,用于在客户端的浏览器加载目标项目后,检测所述浏览器是否支持占位符功能;A function detection module, configured to detect whether the browser supports a placeholder function after the browser of the client loads the target item;
输入框生成模块,用于若所述功能检测模块的检测结果为否,则当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;An input box generating module is configured to generate a target item on a display page of a browser when a request for displaying an input box on the browser is received if a detection result of the function detection module is negative. New input box without placeholder function;
行内元素添加模块,用于在所述新的输入框位置上添加预设的行内元素,以将所述新的输入框模拟成带占位符功能的输入框组件,其中,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。In-line element adding module is configured to add a preset in-line element at the position of the new input box, so as to simulate the new input box into an input box component with a placeholder function. The style is consistent with the style of the input box component generated by using the placeholder function, and the content of the elements in the row is consistent with the placeholder text of the input box component generated by using the placeholder function.
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述浏览器输入框展示方法的步骤。A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, and the processor implements the browser input box when the processor executes the computer-readable instructions Demonstrate method steps.
一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读存储介质存储有计算机可读指令,使得所述一个或多个处理器执行上述浏览器输入框展示方法的步骤。One or more non-volatile readable storage media storing computer readable instructions, the computer readable storage medium storing computer readable instructions, so that the one or more processors execute the above browser input box display Method steps.
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below, and other features and advantages of the present application will become apparent from the description, the drawings, and the claims.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the drawings used in the description of the embodiments of the application will be briefly introduced below. Obviously, the drawings in the following description are just some embodiments of the application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without paying creative labor.
图1是本申请一实施例中浏览器输入框展示方法的一应用环境示意图;1 is a schematic diagram of an application environment of a method for displaying a browser input box according to an embodiment of the present application;
图2是本申请一实施例中浏览器输入框展示方法的一流程图;2 is a flowchart of a browser input box display method according to an embodiment of the present application;
图3是本申请一实施例中浏览器输入框展示方法步骤S101在一个应用场景下的流程示意图;FIG. 3 is a schematic flowchart of an application scenario step S101 of a browser input box display method according to an embodiment of the present application; FIG.
图4是QQ程序的登录界面上两个输入框的示意图;4 is a schematic diagram of two input boxes on a login interface of a QQ program;
图5是本申请一实施例中浏览器输入框展示方法在一个应用场景下模拟占位符文本效 果的流程示意图;5 is a schematic flowchart of a method for displaying a browser input box in an embodiment of the present application to simulate a placeholder text effect in an application scenario;
图6是本申请一实施例中浏览器输入框展示方法在另一个应用场景下的流程示意图;6 is a schematic flowchart of a browser input box display method in another application scenario according to an embodiment of the present application;
图7是本申请一实施例中浏览器输入框展示方法步骤S402在一个应用场景下的流程示意图;FIG. 7 is a schematic flowchart of an application scenario step S402 of a browser input box display method according to an embodiment of the present application;
图8是本申请一实施例中浏览器输入框展示方法在一个应用场景下预先存储得到样式属性历史记录的流程示意图;FIG. 8 is a schematic flowchart of a method for displaying a browser input box in an embodiment of the present application in which an historical record of style attributes is stored in an application scenario;
图9是本申请一实施例中浏览器输入框展示装置的结构示意图;9 is a schematic structural diagram of a browser input box display device according to an embodiment of the present application;
图10是本申请一实施例中计算机设备的一示意图。FIG. 10 is a schematic diagram of a computer device according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In the following, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
本申请提供的浏览器输入框展示方法,可应用在如图1的应用环境中,其中,客户端通过网络与服务器进行通信。其中,客户端可以但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The browser input box display method provided in this application can be applied in the application environment shown in FIG. 1, in which a client communicates with a server through a network. Among them, the client may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers.
在一实施例中,如图2所示,提供一种浏览器输入框展示方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:In an embodiment, as shown in FIG. 2, a method for displaying a browser input box is provided. The method is applied to the server in FIG. 1 as an example, and includes the following steps:
S101、在客户端的浏览器加载目标项目后,检测所述浏览器是否支持占位符功能,若是,则执行步骤S102,若否,则执行步骤S103;S101. After the client browser loads the target item, it is detected whether the browser supports a placeholder function, and if yes, step S102 is performed, and if not, step S103 is performed;
当用户使用客户端的浏览器访问服务器,请求加载服务器的目标项目的数据时,该服务器可以在加载目标项目后,对浏览器进行检测,检测该浏览器是否支持占位符功能。特别地,本实施例中,可以通过在目标项目中预先采用代码设置一个自定义组件,该自定义组件在被浏览器加载后,会自动执行检测功能,检测该浏览器是否支持占位符功能。该自定义组件具体可以为一段代码块,这段代码块可以植入至不同的项目中,实现本方法所述的功能,通用型强。在一个应用场景中,该自定义组件是基于Vue.js框架(属于一种前端js框架)开发的,适用所有vue项目,简易代码为:<vue-input-placeholderplaceholder=”text…”>。When a user accesses the server using a client's browser and requests to load data of the server's target project, the server can detect the browser after loading the target project to detect whether the browser supports a placeholder function. In particular, in this embodiment, a custom component can be set by using code in the target project in advance. After the custom component is loaded by the browser, it will automatically perform a detection function to detect whether the browser supports a placeholder function. . The custom component can be a piece of code block, which can be implanted into different projects to implement the functions described in this method. In an application scenario, the custom component is developed based on the Vue.js framework (belonging to a front-end js framework) and is applicable to all vue projects. The simple code is: <vue-input-placeholderplaceholder = ”text…”>.
需要说明的是,所述目标项目具体可以是承载在该服务器上的网页内容、APP内容,等。It should be noted that the target item may specifically be webpage content, APP content, etc., which are carried on the server.
进一步地,如图3所示,所述步骤S101具体可以包括:Further, as shown in FIG. 3, the step S101 may specifically include:
S201、在所述浏览器上新建测试用的输入框;S201. Create a new input box for testing on the browser;
S202、判断所述测试用的输入框是否带有占位符属性,若是,则执行步骤S203,若否,则执行步骤S204;S202. Determine whether the input box for testing has a placeholder attribute. If yes, go to step S203; if no, go to step S204;
S203、确定所述浏览器支持占位符功能;S203. Determine that the browser supports a placeholder function;
S204、确定所述浏览器不支持占位符功能。S204. Determine that the browser does not support a placeholder function.
对于步骤S201,可以理解的是,为了检测该浏览器是否支持占位符功能,可以先尝试浏览器上的占位符功能,若占位符功能能正常使用,则新建的输入框必然会带有占位符属性。因此,可以先在该浏览器上新建一个测试用的输入框。应当知道的是,新建的这个测试用的输入框时,一般是按照该目标项目的需要来建立,比如,若该目标项目当前加载的内容为用户的登录页面,该登录页面上需要显示让用户输入“账户”和“密码”的输入框,那么,步骤S201测试时,可以新建一个“账户”和/或“密码”的输入框作为测试用的输入框。For step S201, it can be understood that in order to detect whether the browser supports the placeholder function, you can first try the placeholder function on the browser. If the placeholder function can be used normally, the newly created input box will inevitably bring There are placeholder attributes. Therefore, you can first create a test input box on the browser. It should be known that the newly-created input box for the test is generally established according to the needs of the target project. For example, if the content currently loaded by the target project is the user's login page, the login page needs to be displayed for the user Enter the input boxes for "Account" and "Password". Then, during the test in step S201, a new input box for "Account" and / or "Password" can be created as the input box for testing.
对于步骤S202,可以理解的是,若该浏览器是支持占位符功能的,那么,新建的测试用的输入框必然带有占位符属性;反之,若该浏览器不支持占位符功能的,那么,新建的测试用的输入框则不会带有占位符属性。因此,可以通过判断新建的测试用的输入框是否带有占位符属性来确定该浏览器是否支持占位符功能。For step S202, it can be understood that if the browser supports the placeholder function, then the newly created test input box must have the placeholder attribute; otherwise, if the browser does not support the placeholder function Yes, then the newly created test input box will not have a placeholder attribute. Therefore, you can determine whether the browser supports the placeholder function by judging whether the newly created test input box has a placeholder attribute.
对于步骤S203,由上述分析可知,如果所述测试用的输入框带有占位符属性,则可以确定所述浏览器支持占位符功能。For step S203, it can be known from the foregoing analysis that if the input box for testing has a placeholder attribute, it can be determined that the browser supports a placeholder function.
对于步骤S204,由上述分析可知,如果所述测试用的输入框不带有占位符属性,则确定所述浏览器不支持占位符功能。For step S204, it can be known from the foregoing analysis that if the input box for testing does not have a placeholder attribute, it is determined that the browser does not support the placeholder function.
S102、当接收到在所述浏览器上展示输入框的请求时,采用所述占位符功能在所述浏览器的显示页面上生成输入框组件;S102. When receiving a request to display an input box on the browser, use the placeholder function to generate an input box component on a display page of the browser;
可以理解的是,若服务器检测发现该浏览器是支持占位符功能的,那么,当需要在所述浏览器上展示输入框时,比如加载登录页面,可以直接采用原生的占位符功能在该浏览器的显示页面上生成输入框组件。这里所说的输入框组件可以包括输入框本体,以及附属在该输入框本体上的占位符属性,占位符属性可以包括占位符文本、占位符的位置、样式等。It can be understood that if the server detects that the browser supports the placeholder function, when the input box needs to be displayed on the browser, such as loading a login page, the native placeholder function can be directly used in An input box component is generated on the display page of the browser. The input box component mentioned here may include an input box body, and a placeholder attribute attached to the input box body. The placeholder attribute may include a placeholder text, a placeholder position, a style, and the like.
S103、当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;S103. When receiving a request to display an input box on the browser, generate a new input box without a placeholder function required by the target item on a display page of the browser;
可以理解的是,若服务器检测发现该浏览器是不支持占位符功能的,这就表示,在该浏览器上无法采用占位符功能,或者采用占位符功能无法得到正常显示的输入框。为了不让客户端的用户察觉这种差异而导致用户体验下降,本实施例在需要在所述浏览器上展示输入框时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框。It can be understood that if the server detects that the browser does not support the placeholder function, this means that the placeholder function cannot be used on the browser, or the input box cannot be displayed normally by using the placeholder function. . In order to prevent the user of the client from discerning such a difference and causing a decrease in user experience, in this embodiment, when an input box needs to be displayed on the browser, the non-accounting required for generating the target item on a browser display page New input box for token function.
需要说明的是,步骤103应当是按照该目标项目的需要来生成该不带占位符功能的新的输入框。比如,若该目标项目当前加载的内容为用户的登录页面,该登录页面上需要显示让用户输入“账户”和“密码”的输入框,那么,步骤103在生成输入框时,需要分别在“账户”输入位置上生成一个不带占位符功能的新的输入框,在“密码”输入位置上生成另一个不带占位符功能的新的输入框。It should be noted that step 103 should be to generate the new input box without the placeholder function according to the needs of the target project. For example, if the content currently loaded for the target project is a user's login page, the login page needs to display input boxes for the user to enter an "account" and "password". Then, when generating the input boxes in step 103, the user needs to enter A new input box without a placeholder function is generated at the "Account" input position, and another new input box without a placeholder function is generated at the "Password" input position.
S104、在所述新的输入框位置上添加预设的行内元素,以将所述新的输入框模拟成带占位符功能的输入框组件,其中,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。S104. Add a preset inline element to the position of the new input box to simulate the new input box into an input box component with a placeholder function, wherein a style and a placeholder of the inline element are used. The style of the input box component generated by the break function is consistent, and the content of the element in the line is consistent with the placeholder text of the input box component generated by the placeholder function.
可以理解的是,在步骤103生成不带占位符功能的新的输入框之后,为了使得该新的输入框可以与采用占位符功能生成的输入框组件在显示效果上一致,本实施例中,在该新的输入框位置上添加预设的行内元素,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。其中,行内元素是指HTML中的行内元素,由于其不用独占一行的特性,可以与该新的输入框在同一位置上显示,因此可以做到与输入框重叠显示时,模拟上述输入框组件的显示效果。具体地,该行内元素可以是span标签,span标签是可以被用来组合文档中的行内元素之一,由于span没有固定的格式表现,当对它应用样式时,它会产生视觉上的变化,因此可以适用于本实施例提供的浏览器输入框展示方法,对该span标签进行样式控制,即可完成在视觉上对输入框的样式控制。It can be understood that after generating a new input box without a placeholder function in step 103, in order to make the new input box consistent with the display effect of the input box component generated by using the placeholder function, this embodiment In the new input box position, a preset inline element is added, and the style of the inline element is consistent with the style of the input box component generated by the placeholder function, and the content of the inline element is the same as that of the placeholder function. The placeholder text of the generated input box components is consistent. Among them, the in-line element refers to the in-line element in HTML. Because it does not need to occupy a line, it can be displayed at the same position as the new input box. Therefore, it can be simulated when the input box is overlapped with the input box. display effect. Specifically, the in-line element can be a span tag. A span tag is one of the in-line elements that can be used to combine documents. Because a span does not have a fixed format expression, when a style is applied to it, it will produce a visual change. Therefore, it can be applied to the browser input box display method provided in this embodiment. By performing style control on the span tag, the style control of the input box can be completed visually.
需要说明的是,本实施例中所说的占位符文本是指输入框未输入内容时,显示在输入框中的信息,常见的是常用灰色显示的提示信息,如图4所示。参见图4中QQ登录界面上的两个输入框,位于上方的输入框为“账号”的输入框,在用户未输入内容时,其上显示的占位符文本为“QQ号码/手机/邮箱”;位于下方的输入框为“密码”的输入框, 在用户未输入内容时,其上显示的占位符文本为“密码”。It should be noted that the placeholder text in this embodiment refers to the information displayed in the input box when no content is input in the input box. Commonly, the prompt information displayed in gray is common, as shown in FIG. 4. See the two input boxes on the QQ login interface in Figure 4. The input box located above is the input box for "Account". When the user does not enter content, the placeholder text displayed on it is "QQ number / mobile phone / email "; The input box at the bottom is the" password "input box, and the placeholder text displayed on it is" password "when the user has not entered anything.
另外,行内元素的样式是指输入框的呈现形式,其包括突显输入框的框线、花纹、图案等。以QQ登录界面作为举例,位于上方的输入框对应的行内元素的样式可以为“企鹅形阴影图案+下划线+右侧的向下箭头”;位于上方的输入框对应的行内元素的样式可以为“锁形图案+下划线+右侧的键盘图标”。In addition, the style of the element in the row refers to the presentation form of the input box, which includes a frame line, a pattern, a pattern, and the like that highlight the input box. Taking the QQ login interface as an example, the style of the in-line element corresponding to the input box located above can be "penguin-shaped shadow pattern + underline + down arrow on the right side"; the style of the in-line element corresponding to the input box located above can be " Lock pattern + underline + keyboard icon on the right. "
进一步地,对于采用占位符功能生成的输入框组件,其占位符文本通常具有这样的特性:输入框中没有内容时,显示占位符文本;输入框中有内容时,隐藏占位符文本。因此,为了使得行内元素模拟这种效果,参见图5,在步骤S104之后,所述浏览器输入框展示方法还可以包括:Further, for input box components generated by using the placeholder function, the placeholder text usually has the following characteristics: when there is no content in the input box, the placeholder text is displayed; when there is content in the input box, the placeholder is hidden text. Therefore, in order to make the in-line elements simulate this effect, referring to FIG. 5, after step S104, the method for displaying a browser input box may further include:
S301、监听所述新的输入框中的值;S301. Monitor the value in the new input box.
S302、所述新的输入框中有值,则将所述行内元素的内容调整为隐藏状态;S302. If there is a value in the new input box, adjust the content of the element in the row to a hidden state.
S303、若所述新的输入框中无值,则将所述行内元素的内容调整为显示状态。S303. If there is no value in the new input box, adjust the content of the element in the row to a display state.
对于步骤S301,在步骤S104为新的输入框添加了行内元素后,从显示效果上看,该新的输入框上应该显示有占位符文本,此后,服务器可以监听浏览器上的该新的输入框的值,从而可以得知当该新的输入框中值发生变动时,其上是否还有值,从而根据该新的输入框中值的有无情况来调整行内元素的内容的显隐状态。For step S301, after adding inline elements to the new input box in step S104, from the display effect, placeholder text should be displayed on the new input box. Thereafter, the server can listen to the new input box on the browser. The value of the input box, so that you can know whether there is a value on the new input box when the value changes, so that the content of the elements in the row can be adjusted according to the presence or absence of the value in the new input box. status.
对于步骤S302,如果该新的输入框中有值,则表示该输入框中有内容,通常输入框上的内容需要显示出来的,为了不遮挡输入框中显示的内容并且模拟占位符文本的通常特性,可以将所述行内元素的内容调整为隐藏状态。该隐藏状态是指行内元素的内容生成在浏览器的页面上时,不显示,用户无法查看到。与隐藏状态相对的是显示状态,显示状态下的行内元素的内容生成在浏览器的页面上时,按照预设的样式显示在输入框的位置上,用户可以查看到。For step S302, if there is a value in the new input box, it means that there is content in the input box. Generally, the content on the input box needs to be displayed. In order not to block the content displayed in the input box and simulate the placeholder text. In general, the content of the elements in the row can be adjusted to a hidden state. This hidden state means that when the content of the inline element is generated on the browser's page, it is not displayed and cannot be viewed by the user. The opposite of the hidden state is the display state. When the content of the inline elements in the display state is generated on the page of the browser, it is displayed in the position of the input box according to a preset style, which the user can view.
进一步地,在步骤S302之前,还可以包括:若所述新的输入框中有值,则获取所述行内元素的内容当前的第一状态,若所述第一状态为隐藏状态,则不调整所述行内元素的内容的状态;若所述第一状态为显示状态,则将所述行内元素的内容调整为隐藏状态。可以理解的是,当监听到新的输入框中有值时,还需要获取并判断该行内元素的内容当前的状态是隐藏状态还是显示状态,如果本来就是隐藏状态,那显然没必要再调整该行内元素的内容的状态;反之,才需要将该行内元素的内容调整为隐藏状态。Further, before step S302, the method may further include: if there is a value in the new input box, obtaining the current first state of the content of the element in the row; if the first state is a hidden state, no adjustment is performed. A state of the content of the element in the row; if the first state is a display state, adjusting the content of the element in the row to a hidden state. It can be understood that when the new input box has a value, it is necessary to obtain and determine whether the current state of the content of the element in the line is hidden or displayed. If it is hidden, it is obviously unnecessary to adjust the value. The state of the content of the element in the row; otherwise, the content of the element in the row needs to be adjusted to the hidden state.
对于步骤S303,如果该新的输入框中无值,则表示该输入框中没有内容,在设有行内元素的内容的情况下,为了模拟,占位符文本的通常特性,可以将所述行内元素的内 容调整为显示状态。For step S303, if there is no value in the new input box, it means that there is no content in the input box. In the case where the content of the inline element is set, for simulation, the general characteristics of the placeholder text may be The content of the element is adjusted to the display state.
进一步地,在步骤S303之前,还可以包括:若所述新的输入框中无值,则获取所述行内元素的内容当前的第二状态,若所述第二状态为显示状态,则不调整所述行内元素的内容的状态;若所述第二状态为隐藏状态,则将所述行内元素的内容调整为显示状态。可以理解的是,当监听到新的输入框中无值时,还需要获取并判断该行内元素的内容当前的状态是隐藏状态还是显示状态,如果本来就是显示状态,那显然没必要再调整该行内元素的内容的状态;反之,才需要将该行内元素的内容调整为显示状态。Further, before step S303, the method may further include: if there is no value in the new input box, obtaining a current second state of the content of the element in the row; if the second state is a display state, no adjustment is performed. A state of the content of the element in the row; if the second state is a hidden state, adjusting the content of the element in the row to a display state. It can be understood that when there is no value in the new input box, it is necessary to obtain and determine whether the current state of the content of the element in the row is hidden or displayed. If it is originally displayed, it is obviously unnecessary to adjust the value. The state of the content of the element in the row; otherwise, the content of the element in the row needs to be adjusted to the display state.
本实施例执行上述步骤S101~S104,在某种应用场景下会产生新的问题。比如,用户一直使用某个客户端的第一版本的浏览器,第一版本浏览器支持占位符功能,因此加载目标项目后,是采用占位符功能生成输入框组件,该输入框组件的样式由第一版本的浏览器决定;然而,用户后来升级了客户端的浏览器,假设为第二版本的浏览器,该第二版本的浏览器不再支持占位符功能,这就需要采用本方法,在输入框位置上添加行内元素。然而,这里产生的问题是,在第二版本浏览器上添加行内元素显示出来的样式与第一版本浏览器时使用占位符功能得到的样式存在差异,这种支持状态切换后,样式不一致的情况很可能被用户察觉到,不利于用户的使用体验。This embodiment executes the above steps S101 to S104, and a new problem may occur in a certain application scenario. For example, the user has been using the first version of the browser of a certain client. The first version of the browser supports the placeholder function. Therefore, after loading the target project, the placeholder function is used to generate the input box component. The style of the input box component Determined by the first version of the browser; however, the user later upgraded the client's browser, assuming the second version of the browser, the second version of the browser no longer supports the placeholder function, which requires this method Add an inline element to the input box position. However, the problem here is that the style displayed by adding inline elements on the second version of the browser is different from the style obtained by using the placeholder function in the first version of the browser. After this support status is switched, the styles are inconsistent. The situation is likely to be perceived by the user, which is not conducive to the user experience.
进一步地,本实施例针对上述问题,在上述步骤S101-S104的基础上,通过如下步骤解决。如图6所示,在执行步骤S103生成不带占位符功能的新的输入框之前,还可以包括:Further, this embodiment addresses the above problems, and solves the following steps based on the above steps S101-S104. As shown in FIG. 6, before executing step S103 to generate a new input box without a placeholder function, the method may further include:
S401、判断所述客户端的浏览器上一次加载目标项目时是否支持占位符功能,若否,则执行上述步骤S103,若是,则执行步骤S402;S401. Determine whether the client browser supports the placeholder function when the target project was last loaded. If not, perform the above step S103, and if yes, perform step S402;
S402、获取所述客户端的浏览器上一次加载目标项目时采用的占位符样式属性;S402. Obtain a placeholder style attribute used by the client browser when the target project was last loaded.
S403、当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;S403. When receiving a request to display an input box on the browser, generate a new input box without a placeholder function required by the target item on a display page of the browser;
S404、在所述新的输入框位置上添加具有上一次加载目标项目时采用的占位符样式属性的行内元素,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。S404. Add an inline element with a placeholder style attribute that was used when the target item was last loaded on the new input box position, and the content of the inline element and the placeholder of the input box component generated by using the placeholder function Character text is consistent.
对于步骤S401,本方法通过判断客户端的浏览器上一次加载目标项目是是否支持占位符功能来确定该客户端的浏览器是否发生支持状态的切换。这里所说的发生支持状态的切换指的是该客户端的浏览器在上一次加载目标项目时是支持占位符功能的、本次加载目 标项目时却不支持占位符功能的情况,本实施例将这种情况称为支持状态的切换。导致支持状态切换的原因可以有多种,常见是的该客户端的浏览器版本改变了,比如版本升级后,由原先支持占位符功能的旧版本升级为不再支持占位符功能的新版本。若没有发生支持状态的切换,则表示客户端的浏览器在上一次加载目标项目时也是不支持占位符功能,当前该客户端的浏览器也不支持占位符功能,这种情况下,占位符的样式前后是相同的,不会被用户察觉到不同,因此执行上述步骤S103即可。For step S401, the method determines whether the browser of the client supports the placeholder function by determining whether the browser's browser last loaded the target item to support the placeholder function. The switching of the support status mentioned here refers to the case where the client browser supported the placeholder function when the target project was last loaded, but did not support the placeholder function when the target project was loaded this time. This implementation The example refers to this situation as support state switching. There are many possible reasons for switching the support status. It is common that the browser version of the client has changed. For example, after the version is upgraded, the old version that originally supported the placeholder function is upgraded to a new version that no longer supports the placeholder function. . If there is no switching of the support status, it means that the client's browser did not support the placeholder function when the target project was loaded last time, and the browser of the client does not support the placeholder function. In this case, the placeholder The style of the symbol is the same before and after, and will not be noticed by the user. Therefore, the above step S103 may be performed.
对于步骤402,本实施例中,服务器可以每次与客户端通信时,获取并记录客户端的ID(即唯一标识)、浏览器版本号、每次使用的占位符样式属性和每次加载项目的时间,并存储客户端的ID、浏览器版本号、每次使用的占位符样式属性与加载项目的时间之间的对应关系。从而,当判断得知所述客户端的浏览器上一次加载目标项目时是支持占位符功能的,即发生了支持状态的切换时,服务器可以获取到该客户端的浏览器上一次加载目标项目时采用的占位符样式属性。For step 402, in this embodiment, the server can obtain and record the client's ID (that is, the unique identifier), the browser version number, the placeholder style attribute used each time, and the item loaded each time when communicating with the client. Time, and store the correspondence between the client ID, browser version number, placeholder style attributes for each use, and time to load the item. Therefore, when it is determined that the client's browser last loaded the target item, it supports the placeholder function, that is, when the support status is switched, the server can obtain the client's browser's last load of the target item. The placeholder style attribute adopted.
需要说明的是,这里所说的占位符样式属性可以包括占位符样式的颜色、字体、字号等。It should be noted that the placeholder style attributes mentioned herein may include the color, font, font size, etc. of the placeholder style.
更进一步地,如图7所示,所述步骤S402具体可以包括:Furthermore, as shown in FIG. 7, the step S402 may specifically include:
S501、查询样式属性历史记录,确定所述客户端的浏览器最近一次加载目标项目的加载时间,所述样式属性历史记录记录了所述客户端每次加载项目时的加载时间与所采用的占位符样式属性的对应关系;S501. Query the style attribute history to determine the loading time of the client's browser when the target item was last loaded. The style attribute history records the loading time and the placeholder used each time the client loads the item. The correspondence between the style attributes
S502、根据所述样式属性历史记录获取与确定出的所述加载时间对应的占位符样式属性。S502. Obtain a placeholder style attribute corresponding to the determined loading time according to the style attribute history.
对于步骤S501,本实施例中,可以预先建立好样式属性历史记录,该样式属性历史记录至少记录了所述客户端每次加载项目时的加载时间与所采用的占位符样式属性的对应关系,特别地,还可以具体记录客户端的ID(即唯一标识)、浏览器版本号、每次使用的占位符样式属性和每次加载项目的加载时间之间的对应关系。For step S501, in this embodiment, a style attribute history can be established in advance, and the style attribute history records at least the correspondence between the loading time of the client each time the item is loaded and the placeholder style attribute used In particular, the correspondence between the client's ID (that is, the unique identifier), the browser version number, the placeholder style attribute for each use, and the load time for each item loaded can also be specifically recorded.
对于步骤S502,在确定出最近一次加载目标项目的加载时间之后,根据样式属性历史记录中记录的对应关系,可以直接找出该加载时间下所述客户端的浏览器采用的占位符样式属性。For step S502, after determining the loading time of the last time the target item is loaded, according to the corresponding relationship recorded in the style attribute history, it is possible to directly find the placeholder style attribute adopted by the client browser at the loading time.
为便于理解,如图8所示,所述样式属性历史记录可以通过以下步骤预先得到:To facilitate understanding, as shown in FIG. 8, the history history of the style attributes can be obtained in advance through the following steps:
S601、在所述客户端的浏览器每次加载项目时成功加载出输入框后,截取加载出的带占位符文本的所述输入框的效果图片;S601. After the client browser successfully loads the input box each time the project is loaded, intercept the loaded effect picture of the input box with placeholder text;
S602、对所述效果图片进行图像识别,得到所述输入框上占位符样式属性;S602. Perform image recognition on the effect picture to obtain a placeholder style attribute on the input box.
S603、获取所述客户端的浏览器本次加载项目的加载时间;S603. Obtain the loading time of the current loading item of the browser of the client;
S604、关联存储所述加载时间和得到的所述占位符样式属性,得到所述样式属性历史记录。S604. Store the loading time and the obtained placeholder style attributes in association with each other to obtain the style attribute history.
对于步骤S601,可以理解的是,每次当某个客户端的浏览器成功加载出输入框后,不论是采用本实施例的方法,还是采用占位符功能,均可显示出带占位符文本的输入框,此时,服务器可以截取加载出的该输入框的效果图片。For step S601, it can be understood that each time when a client browser successfully loads an input box, whether using the method of the embodiment or the placeholder function, the text with the placeholder can be displayed. Input box. At this time, the server can intercept the loaded effect picture of the input box.
对于步骤S602,可以知道的是,通过图像识别技术,可以从效果图片中识别得出输入框上占位符样式的颜色、字体、字号等属性。For step S602, it can be known that, through the image recognition technology, attributes such as the color, font, and font size of the placeholder style on the input box can be identified from the effect picture.
对于步骤S603和S604,在获得占位符样式属性后,为了方便服务器后续查找和获取,需要可以获取本次加载项目的加载时间,甚至可以获取本次使用的占位符样式属性对应的客户端ID和浏览器版本号,然后关联存储这些数据,从而得到所述样式属性历史记录。For steps S603 and S604, after obtaining the placeholder style attributes, in order to facilitate the subsequent search and acquisition by the server, it is necessary to obtain the loading time of the loaded project, and even obtain the client corresponding to the placeholder style attributes used this time. The ID and the browser version number are then stored in association with each other to obtain the style attribute history.
对于步骤S403,其原理与上述步骤S103类似,此处不再赘述。The principle of step S403 is similar to the above step S103, and details are not described herein again.
对于步骤S404,可知,为了使得在发生支持状态切换的情况下,用户仍然察觉不到输入框的占位符样式发生改变,则需要模拟上一次加载目标项目时的占位符样式效果,因此,本实施例的服务器可以在所述新的输入框位置上添加具有所述客户端浏览器上一次加载目标项目时的占位符样式属性的行内元素,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致,从而,在显示效果上,用户无法察觉前后两次输入框的视觉差异,避免了由于输入框占位符样式出现的差异而降低用户使用体验的情况。For step S404, it can be known that, in order to make the user still not notice that the placeholder style of the input box is changed when the support state is switched, it is necessary to simulate the effect of the placeholder style when the target item was last loaded. Therefore, The server of this embodiment may add an inline element with a placeholder style attribute when the client browser loads the target item last time on the new input box position, and the content of the inline element and the use of the placeholder The placeholder text of the input box component generated by the function is consistent. Therefore, in the display effect, the user cannot detect the visual difference of the input box before and after the two times, which avoids reducing the user experience due to the difference in the placeholder style of the input box. Happening.
本实施例中,通过对该行内元素进行样式控制,使行内元素的样式与采用占位符功能生成的输入框组件的样式一致、行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致,用户不会感知到输入框的占位符功能无法使用,可以正常显示输入框的样式和占位符文本,使得服务器的项目兼容所有浏览器内核版本的客户端,避免出现输入框显示不正常的情况,提升了用户的使用体验。In this embodiment, the style of the inline element is controlled to make the style of the inline element consistent with the style of the input box component generated by the placeholder function, and the content of the inline element is the same as that of the input box component generated by the placeholder function. The placeholder text is the same, users will not perceive that the placeholder function of the input box is unavailable. The style and placeholder text of the input box can be displayed normally, making the server project compatible with all browser kernel versions of the client, avoiding The input box displays abnormal conditions, which improves the user experience.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
在一实施例中,提供一种浏览器输入框展示装置,该浏览器输入框展示装置与上述实施例中浏览器输入框展示方法一一对应。如图9所示,该浏览器输入框展示装置包括功能检测模块701、输入框生成模块702和行内元素添加模块703。各功能模块详细说明如下:In one embodiment, a browser input box display device is provided, and the browser input box display device corresponds to the browser input box display method in the above embodiment in a one-to-one correspondence. As shown in FIG. 9, the browser input box display device includes a function detection module 701, an input box generating module 702, and an in-line element adding module 703. The detailed description of each function module is as follows:
功能检测模块701,用于在客户端的浏览器加载目标项目后,检测所述浏览器是否支持占位符功能;A function detection module 701, configured to detect whether the browser supports a placeholder function after the client browser loads the target item;
输入框生成模块702,用于若所述功能检测模块的检测结果为否,则当接收到在所述浏览器上展示输入框的请求时,生成不带占位符功能的新的输入框;An input box generating module 702 is configured to generate a new input box without a placeholder function when a request for displaying an input box on the browser is received if the detection result of the function detection module is negative;
行内元素添加模块703,用于在所述新的输入框位置上添加预设的行内元素,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。In-line element adding module 703 is configured to add a preset in-line element to the new input box position, and the style of the in-line element is consistent with the style of the input box component generated by using the placeholder function. The content is consistent with the placeholder text of the input box component generated by the placeholder function.
进一步地,所述浏览器输入框展示装置还可以包括:Further, the browser input box display device may further include:
功能判断模块,用于判断所述客户端的浏览器上一次加载目标项目时是否支持占位符功能;A function judgment module, configured to judge whether the client browser supports a placeholder function when the target project was last loaded;
第一触发模块,用于若所述功能判断模块的判断结果为否,则触发所述输入框生成模块;A first triggering module, configured to trigger the input box generating module if the judgment result of the function judgment module is negative;
属性获取模块,用于若所述功能判断模块的判断结果为是,则获取所述客户端的浏览器上一次加载目标项目时采用的占位符样式属性;An attribute obtaining module, configured to obtain a placeholder style attribute used when the browser of the client terminal loads the target item last time if the judgment result of the function judgment module is yes;
第一生成模块,用当接收到在所述浏览器上展示输入框的请求时,生成不带占位符功能的新的输入框;A first generating module, configured to generate a new input box without a placeholder function when receiving a request to display the input box on the browser;
元素添加模块,用于在所述第一生成模块生成的所述新的输入框位置上添加具有上一次加载目标项目时采用的占位符样式属性的行内元素,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。An element adding module, configured to add an in-line element with a placeholder style attribute used when the target item was last loaded on the new input box position generated by the first generating module, and the content and the adoption of the in-line element The placeholder text generated by the placeholder function is consistent with the placeholder text.
进一步地,所述属性获取模块具体可以包括:Further, the attribute obtaining module may specifically include:
记录查询单元,用于查询样式属性历史记录,确定所述客户端的浏览器最近一次加载目标项目的加载时间,所述样式属性历史记录记录了所述客户端每次加载项目时的加载时间与所采用的占位符样式属性的对应关系;A record query unit is used for querying the style attribute history to determine the loading time of the client's browser when the target item was last loaded, and the style attribute history records the loading time and the loading time of each time the client loads the item. Correspondence of adopted placeholder style attributes;
属性确定单元,用于根据所述样式属性历史记录获取与确定出的所述加载时间对应的占位符样式属性;An attribute determining unit, configured to obtain a placeholder style attribute corresponding to the determined loading time according to the style attribute history;
所述样式属性历史记录通过以下模块预先得到:The style attribute history is obtained in advance through the following modules:
图片截取模块,用于在所述客户端的浏览器每次加载项目时成功加载出输入框后,截取加载出的带占位符文本的所述输入框的效果图片;A picture interception module, configured to intercept the loaded effect picture of the input box with placeholder text after the input box is successfully loaded each time the browser of the client loads the item;
图像识别模块,用于对所述效果图片进行图像识别,得到所述输入框上占位符样式属性;An image recognition module, configured to perform image recognition on the effect picture to obtain a placeholder style attribute on the input box;
加载时间获取模块,用于获取所述客户端的浏览器本次加载项目的加载时间;A loading time obtaining module, configured to obtain a loading time of a project loaded by the browser of the client this time;
关联存储模块,用于关联存储所述加载时间和得到的所述占位符样式属性,得到所述样式属性历史记录。An associative storage module is configured to associate and store the loading time and the obtained placeholder style attributes to obtain the style attribute history.
进一步地,所述功能检测模块可以包括:Further, the function detection module may include:
输入框新建单元,用于在所述浏览器上新建测试用的输入框;An input box new unit for creating a test input box on the browser;
输入框判断单元,用于判断所述测试用的输入框是否带有占位符属性;An input box judging unit, configured to determine whether the input box for testing has a placeholder attribute;
第一确定单元,用于若所述输入框判断单元的判断结果为是,则确定所述浏览器支持占位符功能;A first determining unit, configured to determine that the browser supports a placeholder function if the judgment result of the input box judgment unit is yes;
第二确定单元,用于若所述输入框判断单元的判断结果为否,则确定所述浏览器不支持占位符功能。The second determining unit is configured to determine that the browser does not support a placeholder function if the judgment result of the input box judgment unit is no.
进一步地,所述浏览器输入框展示装置还可以包括:Further, the browser input box display device may further include:
输入值监听模块,用于监听所述新的输入框中的值;An input value monitoring module, configured to monitor a value in the new input box;
隐藏模块,用于若所述输入值监听模块监听到所述新的输入框中有值,则将所述行内元素的内容调整为隐藏状态;A hiding module, configured to adjust the content of the element in the row to a hidden state if the input value monitoring module listens to a value in the new input box;
显示模块,用于若所述输入值监听模块监听到所述新的输入框中无值,则将所述行内元素的内容调整为显示状态。The display module is configured to adjust the content of the element in the row to a display state if the input value monitoring module monitors that there is no value in the new input box.
关于浏览器输入框展示装置的具体限定可以参见上文中对于浏览器输入框展示方法的限定,在此不再赘述。上述浏览器输入框展示装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the browser input box display device, refer to the limitation on the browser input box display method described above, and details are not described herein again. Each module in the browser input box display device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the hardware in or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储浏览器输入框展示方法中涉及到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种浏览器输入框展示方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 10. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in a non-volatile storage medium. The database of the computer equipment is used to store data involved in the browser input box display method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by a processor, a browser input box display method is implemented.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并 可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中浏览器输入框展示方法的步骤,例如图2所示的步骤S101至步骤S104。或者,处理器执行计算机可读指令时实现上述实施例中浏览器输入框展示装置的各模块/单元的功能,例如图9所示模块701至模块703的功能。为避免重复,这里不再赘述。In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor. When the processor executes the computer-readable instructions, the browsing in the foregoing embodiment is implemented. The input box displays the steps of the method, such as step S101 to step S104 shown in FIG. 2. Alternatively, when the processor executes the computer-readable instructions, the functions of each module / unit of the browser input box display device in the foregoing embodiment are implemented, for example, the functions of modules 701 to 703 shown in FIG. 9. To avoid repetition, we will not repeat them here.
在一个实施例中,提供了一种计算机可读存储介质,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行计算机可读指令时实现上述方法实施例中浏览器输入框展示方法的步骤,或者,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行计算机可读指令时实现上述装置实施例中浏览器输入框展示装置中各模块/单元的功能。为避免重复,这里不再赘述。In one embodiment, a computer-readable storage medium is provided, the one or more non-volatile storage mediums storing computer-readable instructions, and the computer-readable instructions are executed by one or more processors. , So that when one or more processors execute computer-readable instructions, the steps of the browser input box display method in the foregoing method embodiment are implemented, or the one or more non-volatile readable storages storing computer-readable instructions Medium, when the computer-readable instructions are executed by one or more processors, causing the one or more processors to implement the computer-readable instructions to implement the functions of the modules / units in the browser input box display device in the above device embodiment. To avoid repetition, we will not repeat them here.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by using computer-readable instructions to instruct related hardware. The computer-readable instructions can be stored in a nonvolatile computer In the readable storage medium, the computer-readable instructions, when executed, may include the processes of the embodiments of the methods described above. Wherein, any reference to the storage, storage, database, or other media used in the embodiments provided in this application may include non-volatile and / or volatile storage. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。Those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the above-mentioned division of functional units and modules is used as an example. In practical applications, the above functions can be assigned by different functional units, Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围, 均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to describe the technical solution of the present application, but not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still implement the foregoing implementations. The technical solutions described in the examples are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in Within the scope of this application.

Claims (20)

  1. 一种浏览器输入框展示方法,其特征在于,包括:A browser input box display method is characterized in that it includes:
    在客户端的浏览器加载目标项目后,检测所述浏览器是否支持占位符功能;After the client browser loads the target item, detecting whether the browser supports a placeholder function;
    若所述浏览器不支持占位符功能,则当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;If the browser does not support the placeholder function, when receiving a request to display an input box on the browser, the non-placeholder function required to generate the target item on the browser's display page is generated New input box;
    在所述新的输入框位置上添加预设的行内元素,以将所述新的输入框模拟成带占位符功能的输入框组件,其中,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。Adding a preset inline element on the new input box position to simulate the new input box as an input box component with a placeholder function, wherein the style of the inline element and the use of the placeholder function The generated input box component has the same style, and the content of the elements in the line is consistent with the placeholder text of the input box component generated by using the placeholder function.
  2. 根据权利要求1所述的浏览器输入框展示方法,其特征在于,在生成不带占位符功能的新的输入框之前,还包括:判断所述客户端的浏览器上一次加载目标项目时是否支持占位符功能;The method for displaying an input box of a browser according to claim 1, before generating a new input box without a placeholder function, further comprising: judging whether the client browser loaded a target item last time Support placeholder function;
    若所述客户端的浏览器上一次加载目标项目时不支持占位符功能,则执行生成不带占位符功能的新的输入框的步骤;If the browser of the client side did not support the placeholder function when loading the target project last time, performing the step of generating a new input box without the placeholder function;
    若所述客户端的浏览器上一次加载目标项目时支持占位符功能,则获取所述客户端的浏览器上一次加载目标项目时采用的占位符样式属性;If the browser of the client supports the placeholder function when the target item was last loaded, obtaining the placeholder style attribute used by the client's browser when the target item was last loaded;
    当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;在所述新的输入框位置上添加具有上一次加载目标项目时采用的占位符样式属性的行内元素,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。When receiving a request to display an input box on the browser, generate a new input box without a placeholder function required by the target item on a display page of the browser; in the new input box An inline element with a placeholder style attribute used when the target item was last loaded is added to the position, and the content of the inline element is consistent with the placeholder text of the input box component generated by the placeholder function.
  3. 根据权利要求2所述的浏览器输入框展示方法,其特征在于,所述获取所述客户端的浏览器上一次加载目标项目时采用的占位符样式属性具体包括:The method for displaying a browser input box according to claim 2, wherein the step of obtaining a placeholder style attribute used by the client's browser when the target project was last loaded specifically comprises:
    查询样式属性历史记录,确定所述客户端的浏览器最近一次加载目标项目的加载时间,所述样式属性历史记录记录了所述客户端每次加载项目时的加载时间与所采用的占位符样式属性的对应关系;Query style attribute history to determine the loading time of the client's browser when the target item was last loaded. The style attribute history records the loading time and placeholder style used each time the client loads an item. Correspondence of attributes;
    根据所述样式属性历史记录获取与确定出的所述加载时间对应的占位符样式属性;Obtaining a placeholder style attribute corresponding to the determined loading time according to the style attribute history;
    所述样式属性历史记录通过以下步骤预先得到:The style attribute history is obtained in advance through the following steps:
    在所述客户端的浏览器每次加载项目时成功加载出输入框后,截取加载出的带占位符文本的所述输入框的效果图片;After the client browser successfully loads the input box each time the project is loaded, intercept the loaded effect picture of the input box with placeholder text;
    对所述效果图片进行图像识别,得到所述输入框上占位符样式属性;Performing image recognition on the effect picture to obtain a placeholder style attribute on the input box;
    获取所述客户端的浏览器本次加载项目的加载时间;Obtaining the loading time of the client browser's current loading item;
    关联存储所述加载时间和得到的所述占位符样式属性,得到所述样式属性历史记录。The loading time and the obtained placeholder style attributes are stored in association, and the style attribute history is obtained.
  4. 根据权利要求1所述的浏览器输入框展示方法,其特征在于,所述检测所述浏览器是否支持占位符功能包括:The method for displaying a browser input box according to claim 1, wherein the detecting whether the browser supports a placeholder function comprises:
    在所述浏览器上新建测试用的输入框;Create a new input box for testing on the browser;
    判断所述测试用的输入框是否带有占位符属性;Judging whether the input box for testing has a placeholder attribute;
    若所述测试用的输入框带有占位符属性,则确定所述浏览器支持占位符功能;If the input box for testing has a placeholder attribute, determining that the browser supports a placeholder function;
    若所述测试用的输入框不带有占位符属性,则确定所述浏览器不支持占位符功能。If the input box for testing does not have a placeholder attribute, it is determined that the browser does not support the placeholder function.
  5. 根据权利要求1至4中任一项所述的浏览器输入框展示方法,其特征在于,在所述新的输入框位置上添加预设的行内元素之后,所述浏览器输入框展示方法还包括:The browser input box display method according to any one of claims 1 to 4, wherein after adding a preset inline element to the new input box position, the browser input box display method further comprises: include:
    监听所述新的输入框中的值;Listening to the value in the new input box;
    若所述新的输入框中有值,则将所述行内元素的内容调整为隐藏状态;If there is a value in the new input box, adjusting the content of the element in the row to a hidden state;
    若所述新的输入框中无值,则将所述行内元素的内容调整为显示状态。If there is no value in the new input box, the content of the element in the row is adjusted to a display state.
  6. 一种浏览器输入框展示装置,其特征在于,包括:A browser input box display device, comprising:
    功能检测模块,用于在客户端的浏览器加载目标项目后,检测所述浏览器是否支持占位符功能;A function detection module, configured to detect whether the browser supports a placeholder function after the browser of the client loads the target item;
    输入框生成模块,用于若所述功能检测模块的检测结果为否,则当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;An input box generating module is configured to generate a target item on a display page of a browser when a request for displaying an input box on the browser is received if a detection result of the function detection module is negative. New input box without placeholder function;
    行内元素添加模块,用于在所述新的输入框位置上添加预设的行内元素,以将所述新的输入框模拟成带占位符功能的输入框组件,其中,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。In-line element adding module is configured to add a preset in-line element at the position of the new input box, so as to simulate the new input box into an input box component with a placeholder function. The style is consistent with the style of the input box component generated by using the placeholder function, and the content of the elements in the row is consistent with the placeholder text of the input box component generated by using the placeholder function.
  7. 根据权利要求6所述的浏览器输入框展示装置,其特征在于,所述浏览器输入框展示装置还包括:The browser input box display device according to claim 6, wherein the browser input box display device further comprises:
    功能判断模块,用于判断所述客户端的浏览器上一次加载目标项目时是否支持占位符功能;A function judgment module, configured to judge whether the client browser supports a placeholder function when the target project was last loaded;
    第一触发模块,用于若所述功能判断模块的判断结果为否,则触发所述输入框生成模块;A first triggering module, configured to trigger the input box generating module if the judgment result of the function judgment module is negative;
    属性获取模块,用于若所述功能判断模块的判断结果为是,则获取所述客户端的浏览 器上一次加载目标项目时采用的占位符样式属性;An attribute obtaining module, configured to obtain a placeholder style attribute used by the client browser when the browser's browser last loaded the target item if the judgment result of the function judgment module is yes;
    第一生成模块,用当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;A first generating module, configured to generate a new input box without a placeholder function required by the target item on a display page of the browser when a request for displaying the input box on the browser is received;
    元素添加模块,用于在所述第一生成模块生成的所述新的输入框位置上添加具有上一次加载目标项目时采用的占位符样式属性的行内元素,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。An element adding module, configured to add an in-line element with a placeholder style attribute used when the target item was last loaded on the new input box position generated by the first generating module, and the content and the adoption of the in-line element The placeholder text generated by the placeholder function is consistent with the placeholder text.
  8. 根据权利要求7所述的浏览器输入框展示装置,其特征在于,所述属性获取模块具体包括:The browser input box display device according to claim 7, wherein the attribute acquisition module specifically comprises:
    记录查询单元,用于查询样式属性历史记录,确定所述客户端的浏览器最近一次加载目标项目的加载时间,所述样式属性历史记录记录了所述客户端每次加载项目时的加载时间与所采用的占位符样式属性的对应关系;A record query unit is used for querying the style attribute history to determine the loading time of the client's browser when the target item was last loaded, and the style attribute history records the loading time and the loading time of each time the client loads the item. Correspondence of adopted placeholder style attributes;
    属性确定单元,用于根据所述样式属性历史记录获取与确定出的所述加载时间对应的占位符样式属性;An attribute determining unit, configured to obtain a placeholder style attribute corresponding to the determined loading time according to the style attribute history;
    所述样式属性历史记录通过以下模块预先得到:The style attribute history is obtained in advance through the following modules:
    图片截取模块,用于在所述客户端的浏览器每次加载项目时成功加载出输入框后,截取加载出的带占位符文本的所述输入框的效果图片;A picture interception module, configured to intercept the loaded effect picture of the input box with placeholder text after the input box is successfully loaded each time the browser of the client loads the item;
    图像识别模块,用于对所述效果图片进行图像识别,得到所述输入框上占位符样式属性;An image recognition module, configured to perform image recognition on the effect picture to obtain a placeholder style attribute on the input box;
    加载时间获取模块,用于获取所述客户端的浏览器本次加载项目的加载时间;A loading time obtaining module, configured to obtain a loading time of a project loaded by the browser of the client this time;
    关联存储模块,用于关联存储所述加载时间和得到的所述占位符样式属性,得到所述样式属性历史记录。An associative storage module is configured to associate and store the loading time and the obtained placeholder style attributes to obtain the style attribute history.
  9. 根据权利要求6所述的浏览器输入框展示装置,其特征在于,所述功能检测模块包括:The browser input box display device according to claim 6, wherein the function detection module comprises:
    输入框新建单元,用于在所述浏览器上新建测试用的输入框;An input box new unit for creating a test input box on the browser;
    输入框判断单元,用于判断所述测试用的输入框是否带有占位符属性;An input box judging unit, configured to determine whether the input box for testing has a placeholder attribute;
    第一确定单元,用于若所述输入框判断单元的判断结果为是,则确定所述浏览器支持占位符功能;A first determining unit, configured to determine that the browser supports a placeholder function if the judgment result of the input box judgment unit is yes;
    第二确定单元,用于若所述输入框判断单元的判断结果为否,则确定所述浏览器不支持占位符功能。The second determining unit is configured to determine that the browser does not support a placeholder function if the judgment result of the input box judgment unit is no.
  10. 根据权利要求6至9中任一项所述的浏览器输入框展示装置,其特征在于,所述 浏览器输入框展示装置还包括:The browser input box display device according to any one of claims 6 to 9, wherein the browser input box display device further comprises:
    输入值监听模块,用于监听所述新的输入框中的值;An input value monitoring module, configured to monitor a value in the new input box;
    隐藏模块,用于若所述输入值监听模块监听到所述新的输入框中有值,则将所述行内元素的内容调整为隐藏状态;A hiding module, configured to adjust the content of the element in the row to a hidden state if the input value monitoring module listens to a value in the new input box;
    显示模块,用于若所述输入值监听模块监听到所述新的输入框中无值,则将所述行内元素的内容调整为显示状态。The display module is configured to adjust the content of the element in the row to a display state if the input value monitoring module monitors that there is no value in the new input box.
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, and is characterized in that the processor implements the computer-readable instructions as follows step:
    在客户端的浏览器加载目标项目后,检测所述浏览器是否支持占位符功能;After the client browser loads the target item, detecting whether the browser supports a placeholder function;
    若所述浏览器不支持占位符功能,则当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;If the browser does not support the placeholder function, when receiving a request to display an input box on the browser, the non-placeholder function required to generate the target item on the browser's display page is generated New input box;
    在所述新的输入框位置上添加预设的行内元素,以将所述新的输入框模拟成带占位符功能的输入框组件,其中,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。Adding a preset inline element on the new input box position to simulate the new input box as an input box component with a placeholder function, wherein the style of the inline element and the use of the placeholder function The generated input box component has the same style, and the content of the elements in the line is consistent with the placeholder text of the input box component generated by using the placeholder function.
  12. 根据权利要求11所述的计算机设备,其特征在于,在生成不带占位符功能的新的输入框之前,所述处理器执行所述计算机可读指令时还实现如下步骤:判断所述客户端的浏览器上一次加载目标项目时是否支持占位符功能;The computer device according to claim 11, characterized in that before generating a new input box without a placeholder function, the processor, when executing the computer-readable instructions, further implements the following step: judging the client Whether the browser supports the placeholder function when the target project was last loaded;
    若所述客户端的浏览器上一次加载目标项目时不支持占位符功能,则执行生成不带占位符功能的新的输入框的步骤;If the browser of the client side did not support the placeholder function when loading the target project last time, performing the step of generating a new input box without the placeholder function;
    若所述客户端的浏览器上一次加载目标项目时支持占位符功能,则获取所述客户端的浏览器上一次加载目标项目时采用的占位符样式属性;If the browser of the client supports the placeholder function when the target item was last loaded, obtaining the placeholder style attribute used by the client's browser when the target item was last loaded;
    当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;在所述新的输入框位置上添加具有上一次加载目标项目时采用的占位符样式属性的行内元素,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。When receiving a request to display an input box on the browser, generate a new input box without a placeholder function required by the target item on a display page of the browser; in the new input box An inline element with a placeholder style attribute used when the target item was last loaded is added to the position, and the content of the inline element is consistent with the placeholder text of the input box component generated by the placeholder function.
  13. 根据权利要求12所述的计算机设备,其特征在于,所述获取所述客户端的浏览器上一次加载目标项目时采用的占位符样式属性具体包括:The computer device according to claim 12, wherein the obtaining a placeholder style attribute used when the browser of the client terminal loads a target item last time comprises:
    查询样式属性历史记录,确定所述客户端的浏览器最近一次加载目标项目的加载时间,所述样式属性历史记录记录了所述客户端每次加载项目时的加载时间与所采用的占位 符样式属性的对应关系;Query style attribute history to determine the loading time of the client's browser when the target item was last loaded. The style attribute history records the loading time and placeholder style used each time the client loads an item. Correspondence of attributes;
    根据所述样式属性历史记录获取与确定出的所述加载时间对应的占位符样式属性;Obtaining a placeholder style attribute corresponding to the determined loading time according to the style attribute history;
    所述样式属性历史记录通过以下步骤预先得到:The style attribute history is obtained in advance through the following steps:
    在所述客户端的浏览器每次加载项目时成功加载出输入框后,截取加载出的带占位符文本的所述输入框的效果图片;After the client browser successfully loads the input box each time the project is loaded, intercept the loaded effect picture of the input box with placeholder text;
    对所述效果图片进行图像识别,得到所述输入框上占位符样式属性;Performing image recognition on the effect picture to obtain a placeholder style attribute on the input box;
    获取所述客户端的浏览器本次加载项目的加载时间;Obtaining the loading time of the client browser's current loading item;
    关联存储所述加载时间和得到的所述占位符样式属性,得到所述样式属性历史记录。The loading time and the obtained placeholder style attributes are stored in association, and the style attribute history is obtained.
  14. 根据权利要求11所述的计算机设备,其特征在于,所述检测所述浏览器是否支持占位符功能包括:The computer device according to claim 11, wherein the detecting whether the browser supports a placeholder function comprises:
    在所述浏览器上新建测试用的输入框;Create a new input box for testing on the browser;
    判断所述测试用的输入框是否带有占位符属性;Judging whether the input box for testing has a placeholder attribute;
    若所述测试用的输入框带有占位符属性,则确定所述浏览器支持占位符功能;If the input box for testing has a placeholder attribute, determining that the browser supports a placeholder function;
    若所述测试用的输入框不带有占位符属性,则确定所述浏览器不支持占位符功能。If the input box for testing does not have a placeholder attribute, it is determined that the browser does not support the placeholder function.
  15. 根据权利要求11至14中任一项所述的计算机设备,其特征在于,在所述新的输入框位置上添加预设的行内元素之后,所述处理器执行所述计算机可读指令时还实现如下步骤:The computer device according to any one of claims 11 to 14, wherein after a preset inline element is added to the new input box position, the processor further executes the computer-readable instruction. To achieve the following steps:
    监听所述新的输入框中的值;Listening to the value in the new input box;
    若所述新的输入框中有值,则将所述行内元素的内容调整为隐藏状态;If there is a value in the new input box, adjusting the content of the element in the row to a hidden state;
    若所述新的输入框中无值,则将所述行内元素的内容调整为显示状态。If there is no value in the new input box, the content of the element in the row is adjusted to a display state.
  16. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more non-volatile readable storage media storing computer readable instructions, characterized in that when the computer readable instructions are executed by one or more processors, the one or more processors are caused to execute The following steps:
    在客户端的浏览器加载目标项目后,检测所述浏览器是否支持占位符功能;After the client browser loads the target item, detecting whether the browser supports a placeholder function;
    若所述浏览器不支持占位符功能,则当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;If the browser does not support the placeholder function, when receiving a request to display an input box on the browser, the non-placeholder function required to generate the target item on the browser's display page is generated New input box;
    在所述新的输入框位置上添加预设的行内元素,以将所述新的输入框模拟成带占位符功能的输入框组件,其中,所述行内元素的样式与采用占位符功能生成的输入框组件的样式一致,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。Adding a preset inline element on the new input box position to simulate the new input box as an input box component with a placeholder function, wherein the style of the inline element and the use of the placeholder function The generated input box component has the same style, and the content of the elements in the line is consistent with the placeholder text of the input box component generated by using the placeholder function.
  17. 根据权利要求16所述的非易失性可读存储介质,其特征在于,在生成不带占位符功能的新的输入框之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个 或多个处理器还执行如下步骤:判断所述客户端的浏览器上一次加载目标项目时是否支持占位符功能;The non-volatile readable storage medium according to claim 16, wherein before generating a new input box without a placeholder function, the computer-readable instructions are executed by one or more processors. So that the one or more processors further perform the following steps: determine whether the client browser supports a placeholder function when the target item was last loaded;
    若所述客户端的浏览器上一次加载目标项目时不支持占位符功能,则执行生成不带占位符功能的新的输入框的步骤;If the browser of the client side did not support the placeholder function when loading the target project last time, performing the step of generating a new input box without the placeholder function;
    若所述客户端的浏览器上一次加载目标项目时支持占位符功能,则获取所述客户端的浏览器上一次加载目标项目时采用的占位符样式属性;If the browser of the client supports the placeholder function when the target item was last loaded, obtaining the placeholder style attribute used by the client's browser when the target item was last loaded;
    当接收到在所述浏览器上展示输入框的请求时,在浏览器的显示页面上生成所述目标项目所需的不带占位符功能的新的输入框;在所述新的输入框位置上添加具有上一次加载目标项目时采用的占位符样式属性的行内元素,所述行内元素的内容与采用占位符功能生成的输入框组件的占位符文本一致。When receiving a request to display an input box on the browser, generate a new input box without a placeholder function required by the target item on a display page of the browser; in the new input box An inline element with a placeholder style attribute used when the target item was last loaded is added to the position, and the content of the inline element is consistent with the placeholder text of the input box component generated by the placeholder function.
  18. 根据权利要求17所述的非易失性可读存储介质,其特征在于,所述获取所述客户端的浏览器上一次加载目标项目时采用的占位符样式属性具体包括:The non-volatile readable storage medium according to claim 17, wherein the obtaining the placeholder style attributes used when the browser of the client last loaded the target item specifically comprises:
    查询样式属性历史记录,确定所述客户端的浏览器最近一次加载目标项目的加载时间,所述样式属性历史记录记录了所述客户端每次加载项目时的加载时间与所采用的占位符样式属性的对应关系;Query style attribute history to determine the loading time of the client's browser when the target item was last loaded. The style attribute history records the loading time and placeholder style used each time the client loads an item. Correspondence of attributes;
    根据所述样式属性历史记录获取与确定出的所述加载时间对应的占位符样式属性;Obtaining a placeholder style attribute corresponding to the determined loading time according to the style attribute history;
    所述样式属性历史记录通过以下步骤预先得到:The style attribute history is obtained in advance through the following steps:
    在所述客户端的浏览器每次加载项目时成功加载出输入框后,截取加载出的带占位符文本的所述输入框的效果图片;After the client browser successfully loads the input box each time the project is loaded, intercept the loaded effect picture of the input box with placeholder text;
    对所述效果图片进行图像识别,得到所述输入框上占位符样式属性;Performing image recognition on the effect picture to obtain a placeholder style attribute on the input box;
    获取所述客户端的浏览器本次加载项目的加载时间;Obtaining the loading time of the client browser's current loading item;
    关联存储所述加载时间和得到的所述占位符样式属性,得到所述样式属性历史记录。The loading time and the obtained placeholder style attributes are stored in association, and the style attribute history is obtained.
  19. 根据权利要求16所述的非易失性可读存储介质,其特征在于,所述检测所述浏览器是否支持占位符功能包括:The non-volatile readable storage medium according to claim 16, wherein the detecting whether the browser supports a placeholder function comprises:
    在所述浏览器上新建测试用的输入框;Create a new input box for testing on the browser;
    判断所述测试用的输入框是否带有占位符属性;Judging whether the input box for testing has a placeholder attribute;
    若所述测试用的输入框带有占位符属性,则确定所述浏览器支持占位符功能;If the input box for testing has a placeholder attribute, determining that the browser supports a placeholder function;
    若所述测试用的输入框不带有占位符属性,则确定所述浏览器不支持占位符功能。If the input box for testing does not have a placeholder attribute, it is determined that the browser does not support the placeholder function.
  20. 根据权利要求16至19中任一项所述的非易失性可读存储介质,其特征在于,在所述新的输入框位置上添加预设的行内元素之后,所述计算机可读指令被一个或多个处理 器执行时,使得所述一个或多个处理器还执行如下步骤:The non-volatile readable storage medium according to any one of claims 16 to 19, wherein after adding a preset in-line element to the new input box position, the computer-readable instructions are When the one or more processors execute, the one or more processors further perform the following steps:
    监听所述新的输入框中的值;Listening to the value in the new input box;
    若所述新的输入框中有值,则将所述行内元素的内容调整为隐藏状态;If there is a value in the new input box, adjusting the content of the element in the row to a hidden state;
    若所述新的输入框中无值,则将所述行内元素的内容调整为显示状态。If there is no value in the new input box, the content of the element in the row is adjusted to a display state.
PCT/CN2018/105417 2018-07-06 2018-09-13 Browser input box display method and apparatus, computer device, and storage medium WO2020006864A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810735637.3 2018-07-06
CN201810735637.3A CN109190067B (en) 2018-07-06 2018-07-06 Browser input box display method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020006864A1 true WO2020006864A1 (en) 2020-01-09

Family

ID=64936119

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/105417 WO2020006864A1 (en) 2018-07-06 2018-09-13 Browser input box display method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN109190067B (en)
WO (1) WO2020006864A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181372A (en) * 2020-09-18 2021-01-05 北京罗克维尔斯科技有限公司 Construction method and device of automobile business management system and electronic equipment
CN113010159A (en) * 2021-03-23 2021-06-22 中国建设银行股份有限公司 Script-based task processing method and device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459580B (en) * 2019-01-22 2023-06-20 阿里巴巴集团控股有限公司 Page display method and device
CN110489682B (en) * 2019-07-08 2022-04-15 北京三快在线科技有限公司 Page loading method and device
CN114518912B (en) * 2022-02-21 2023-04-25 度小满科技(北京)有限公司 Page loading method, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764189A (en) * 2004-09-29 2006-04-26 国际商业机器公司 Method and system for providing content over a network
CN102968312A (en) * 2011-12-20 2013-03-13 微软公司 User interface placeholder used for application extension program
US20130326392A1 (en) * 2012-05-30 2013-12-05 Research In Motion Limited Portable electronic device including a placeholder for an entry field and method of controlling same
CN105528132A (en) * 2014-09-29 2016-04-27 腾讯科技(深圳)有限公司 Text input box display method and apparatus applied to browser

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764189A (en) * 2004-09-29 2006-04-26 国际商业机器公司 Method and system for providing content over a network
CN102968312A (en) * 2011-12-20 2013-03-13 微软公司 User interface placeholder used for application extension program
US20130326392A1 (en) * 2012-05-30 2013-12-05 Research In Motion Limited Portable electronic device including a placeholder for an entry field and method of controlling same
CN105528132A (en) * 2014-09-29 2016-04-27 腾讯科技(深圳)有限公司 Text input box display method and apparatus applied to browser

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181372A (en) * 2020-09-18 2021-01-05 北京罗克维尔斯科技有限公司 Construction method and device of automobile business management system and electronic equipment
CN112181372B (en) * 2020-09-18 2024-02-13 北京罗克维尔斯科技有限公司 Construction method and device of automobile service management system and electronic equipment
CN113010159A (en) * 2021-03-23 2021-06-22 中国建设银行股份有限公司 Script-based task processing method and device

Also Published As

Publication number Publication date
CN109190067B (en) 2023-04-28
CN109190067A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
WO2020006864A1 (en) Browser input box display method and apparatus, computer device, and storage medium
US10699061B2 (en) Application page quick access
US20180322215A1 (en) Web page access method and apparatus
US11449570B2 (en) Data caching method and apparatus
CN111125169B (en) Data query method, control device, control medium and computer equipment
US11055085B2 (en) Method, apparatus, and system for hot-deploying application
US20190334872A1 (en) Advertisement interception method, terminal device and storage medium
TW201810071A (en) Page component dynamic layout method and apparatus, and client
US10146750B2 (en) Method, apparatus, terminal, and storage medium for image processing
US9178746B2 (en) Browser-based fetch of external libraries
WO2021159783A1 (en) Web page interface query method and apparatus, electronic device, and storage medium
CN111431767B (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
WO2024011899A1 (en) Widget loading method and apparatus, device, and storage medium
US10089139B2 (en) Systems, methods and media for managing embedded content
TW201525740A (en) Method and device for displaying web page and computer-readable storage medium
US11526337B2 (en) Systems and methods for consistent feature flag evaluation
US10095791B2 (en) Information search method and apparatus
WO2015058614A1 (en) Bookmark storage method and device, and method and device for determining bookmark to be browsed
US20140032652A1 (en) Web browser operation method and system
US9619107B2 (en) Methods and systems for dynamically displaying icons on a user interface for security check and other functions
CN114297547A (en) Page element adjusting method, device, equipment, storage medium and program product
WO2020019450A1 (en) Split asynchronous loading method and apparatus, terminal device, and storage medium
US9830401B2 (en) Automatically selecting optimization filters for optimizing webpages
CN115270028A (en) Browser document display method and device, computer equipment and storage medium
US20240073211A1 (en) Systems and methods for retrieving data using a browser instance

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18925176

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18925176

Country of ref document: EP

Kind code of ref document: A1