码迷,mamicode.com
首页 > Web开发 > 详细

jQuery load()

时间:2019-07-20 19:54:23      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:blog   eth   体验   提交表单   other   json   data   表单   tps   

$(‘#gridId‘).load(url, data, callback(data){});// data: JSONObject or String

可以在一个页面动态加载另一个页面(如动态加载JSP到指定的DIV)。

这个特性的应用场景是查询页面。传统的查询页面是:输入查询条件,点击“搜索”后,提交表单,把查询条件传输到后台,获取数据后,跳转到原页面,然后通过循环显示查询到的结果。这样的不足是:页面会闪动,体验不好。

The POST method is used if data is provided as an object; otherwise, GET is assumed.

参考:

https://api.jquery.com/load/

https://www.cnblogs.com/sharpest/p/7725526.html

jQuery load()

标签:blog   eth   体验   提交表单   other   json   data   表单   tps   

原文地址:https://www.cnblogs.com/wangxinbo/p/11218955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!