Now I want to write a JS to complete an operation:
As shown in figure: click search first, after waiting for the data load, click the export button, export data,
Now is in a problem, click search, web page will response for a period of time, will show the data, this time to click export,
So I want to click on the search, whether a page to load or data loading is completed, the execution export,
Request how to judge whether a page to load or data to load? Without data haven't finished loading, begin to implement export,
tosearch ();//call lookup button
/*
Intermediate should be how to write??
*/
ExportExcelDataAll ();//call the export button
CodePudding user response:
Click on the query, the export button is disabled, when data request to come over, the export button to cancel the disabledCodePudding user response:
You look after the data have been get to, and then the data can be directly deduced after binding to the page, your so-called click on the search page reaction after a period of time, this is what you get + data bound to the time of the pageCodePudding user response:
Time interval is the API response time, actually does not affect the page display data, export is API data returned by the operation, as long as the API response can click export,Point to disable the export button when searching, the API response to click the export button can condition disabled attributes
CodePudding user response: