P粉3015232982023-08-10 00:47:10
I don’t know what your mark looks like, but I guess the button you are talking about looks like this:
<button id="foo" onclick="generateReport()">点击我</button>
Since you said that button is already generating a report, there must be a click handler. Here, I call it generateReport
. In this function, it is assumed that an AJAX request will be made to your server to generate and download the report.
When the AJAX request completes successfully, you will want to log that the report has been generated.
I can’t explain more without seeing the code.