Request data from the background to render the front-end table. If the data length returned by the background is 0, "No data yet" will be displayed in the table.
I have already written it in html
<tr class="isNoData"><td colspan="8" style="height:24px;line-height:24px;font-size:12px;">暂无数据</td>
Because in the initial state, this line is not displayed, so the isNoData class is written with display: none, but how to dynamically control it now?
There is a select box on the page. Select one of the items and click the search button, and the data will be requested again
Maybe there is something wrong with my question statement. Every time this select selects a state, click Search or re-request data. Once "No Data" appears, "No Data" will always exist no matter how you switch it. Finally, please use this function. Adding $(".isNoData").hide(); at the beginning solves this problem.
Special thanks to the students who answered the questions! !
When you encounter problems, you should think calmly
认证高级PHP讲师