刷新div而不是整个页面

发布于 2024-11-02 12:29:49 字数 1337 浏览 1 评论 0原文

这是我的代码:

main.php:

<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<div id="TabbedPanels1" class="TabbedPanels" align="left">
  <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">Member Group</li>
    <li class="TabbedPanelsTab" tabindex="0">Fine Group</li>
    <li class="TabbedPanelsTab" tabindex="0">Department</li>
    <li class="TabbedPanelsTab" tabindex="0">Member</li>
  </ul>
 <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">  <?php include 'menage member group.php'; ?></div>
    <div class="TabbedPanelsContent"> <?php include 'manage fine group.php'; ?></div>
    <div class="TabbedPanelsContent"> <?php include 'manage department group.php'; ?></div>
    <div class="TabbedPanelsContent"> <?php include 'manage member main.php'; ?></div>
  </div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>

当我单击Menage Member Main.php中包含的提交按钮时,整个页面将被刷新。

Here is my code:

main.php:

<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<div id="TabbedPanels1" class="TabbedPanels" align="left">
  <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">Member Group</li>
    <li class="TabbedPanelsTab" tabindex="0">Fine Group</li>
    <li class="TabbedPanelsTab" tabindex="0">Department</li>
    <li class="TabbedPanelsTab" tabindex="0">Member</li>
  </ul>
 <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">  <?php include 'menage member group.php'; ?></div>
    <div class="TabbedPanelsContent"> <?php include 'manage fine group.php'; ?></div>
    <div class="TabbedPanelsContent"> <?php include 'manage department group.php'; ?></div>
    <div class="TabbedPanelsContent"> <?php include 'manage member main.php'; ?></div>
  </div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>

when I click submit button which contain in menage member main.php.the whole page will be refreshed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

会发光的星星闪亮亮i 2024-11-09 12:29:49

Look around for AJAX tutorials and you'll find an answer. You can't do this with PHP alone as you'll also need JavaScript or a JavaScript library like jQuery.祝你好运 :)

Look around for AJAX tutorials and you'll find an answer. You can't do this with PHP alone as you'll also need JavaScript or a JavaScript library like jQuery. Good luck :)

離人涙 2024-11-09 12:29:49

通过设计,提交按钮将产生刷新页面的影响,除非您使用诸如客户端脚本之类的内容来超越此行为。

像 AJAX 这样的技术可以克服这个特性,尽管对于它是否真的像看起来那样是一个问题仍然存在一些争论。

一般评论,我会避免在文件名中使用空格,例如'Menage Member group.php'

Submit buttons, by design, will have the affect of refreshing the page, unless you use stuff like client side scripting to override this behaviour.

Techniques like AJAX can overcome this feature, although there is still some debate over if it really is as much an issue as it seems.

As a general comment, I'd avoid using spaces in filenames e.g. 'menage member group.php'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文