重新加载网站的一部分 [英] Reload just one part of a webside
本文介绍了重新加载网站的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿伙计们,
我的网页上有很多桌子行和
Hey guys,
I have a webside with lots of table rows and
<td>
'。
但是如何在一个
''s.
But how can I reload a .php part in one
<td>
中重新加载.php部分而不重新加载整个方面?
without reload the whole side?
推荐答案
我会使用AJAX,特别是我会使用jQuery来简化AJAX。你不必使用jQuery。策略是:
I would use AJAX, and specifically I would use jQuery to make AJAX simpler. You don''t have to use jQuery though. The strategy is:
- 给你想要的< td> 更新唯一ID。
- 响应标记为更新的按钮上的点击事件。使用jQuery响应此事件。
- 使用jQuery调用远程服务器上的php脚本。
- 使用jQuery,更新< td>的HTML 使用您在步骤1中创建的ID。
- Give the <td> you want to update a unique ID.
- Respond to a click event on a button labeled "Update". Respond to this event with jQuery.
- Use jQuery to call the php script on the remote server.
- Using jQuery, update the HTML of the <td> using the ID you created in step 1.
在第一个示例中使用 load()在本教程中可能是一个很好的起点:
使用jQuery进行AJAX调用的5种方法
Using load() in the first example in this tutorial is probably a good place to start:
5 ways to make AJAX calls with jQuery
对该部分使用iframe并刷新.. < br $> b $ b
iframe标签 [ ^ ]
Use Iframes for that part and refresh that..
iframe Tag[^]
这篇关于重新加载网站的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文