如何清除数据并滚动按钮单击? [英] How to clear data and scroll on button click?

查看:84
本文介绍了如何清除数据并滚动按钮单击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个搜索按钮,点击它会先显示10个结果,滚动显示另外10个,依此类推。使用存储过程通过页面索引处理滚动。在每个滚动页面上索引将是页面索引+ 1.



如果我滚动2次将显示20个数据,并且在点击搜索按钮时将显示新的搜索页面索引更改为1但滚动无法更改,它显示20个数据,但我需要首先显示10个值。



我到目前为止使用的是$(。MydivName)。empty();清除div中的先前数据。但滚动无法清除。

Hi,

I have a search button, on clicking it shows 10 results first and on scroll show another 10 and so on. Scroll is handled by page index using stored procedure. On each scroll page index will be page index + 1.

If I scroll 2 times there will show 20 data and on clicking search button for new search page index will be changed to 1 but scroll cannot be changed, it shows 20 data but I need 10 values to be shown first.

I have done so far is using $(".MydivName").empty(); to clear previous data in the div. But the scroll cannot be cleared.

推荐答案

(。MydivName)。empty();清除div中的先前数据。但滚动无法清除。
(".MydivName").empty(); to clear previous data in the div. But the scroll cannot be cleared.


这篇关于如何清除数据并滚动按钮单击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆