简体   繁体   中英

Refreshing a page without reloading it?

So within a website is a div that contains another part of the website being loaded when a tab is clicked.

So let's say clicking a tab loads up a file called "hive/index.php". When someone clicks on an option in an autocomplete, I only want to reload hive/index.php and still have the rest of the page, not the entire webpage. How do I do that?

If using jQuery,

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>   
$('#divID').load('hive/index.php'); //<- Use this on any event in which you want to refresh the content
</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM