Home > Web Front-end > JS Tutorial > JQuery小知识_jquery

JQuery小知识_jquery

WBOY
Release: 2016-05-16 18:18:38
Original
870 people have browsed it

但如果改动较大,代码量就比较大。

此时可以采用jquery 的load方法来实现局部刷新

复制代码 代码如下:


some thing
...
...

$(#content).load(location.href + ' #content>*');

此时content里的内容就会被替换成最新的了,因为走的是完整的请求循环,所以,view模板上的一些权限判断等等都可以自动完成,非常方便。
注意content后面的>* (所有后代元素)不要忘记,不然他会把自身添加进来,就出现嵌套了
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template