在使用bootstraptable时,刷新数据有两个方法refresh、refreshoptions,其用法相似:
<table id="event_table"></table> ... <script> $("#event_table").bootstraptable('refresh', {url: new_url }); $("#event_table").bootstraptable('refreshoptions', {url:new_url}); </script>
refresh:从server端重新获取数据。
refreshoptions:更新bootstraptable options,并从server端获取数据。与refresh的区别在于,refreshoptions设置的option,会被作为下次请求server数据的默认option使用。
另外,使用refreshoptions时,注意bootstraptable的版本,一些老版本不支持该方法。
bootstraptable请求数据时设置超时(timeout)的方法
以上所述是小编给大家介绍的boostraptable的refresh和refreshoptions区别浅析,希望对大家有所帮助
如对本文有疑问, 点击进行留言回复!!
MFC的静态库.lib、动态库.dll(包含引入库.lib)以及Unicode库示例
CTF 刷题记录(一) 白云新闻搜索(手动与自动化SQL注入)
javascript如何使用函数random来实现课堂随机点名方法详解
网友评论