"" Local refresh:

Source: Internet
Author: User

"" Local refresh:

  1. //页面加载时绑定按钮点击事件
  2. $(function(){
  3.     $("#按钮id").click(function(){
  4.         refresh();
  5.     });
  6. });
  7. //点击按钮调用的方法
  8. function refresh(){
  9.     window.location.reload();//刷新当前页面.
  10.     
  11.     //或者下方刷新方法
  12.     //parent.location.reload()刷新父亲对象(用于框架)--需在iframe框架内使用
  13.     // opener.location.reload()刷新父窗口对象(用于单开窗口
  14.   //top.location.reload()刷新最顶端对象(用于多开窗口)
  15. }
how HTML implements a label auto-refresh
JavaScript refreshes the page in several ways:
  1. history.go(0)
  2. location.reload()
  3. location=location
  4. location.assign(location)
  5. document.execCommand(‘Refresh‘)
  6. window.navigate(location)
  7. location.replace(location)
  8. document.URL=location.href





"" Local refresh:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.