刷新div而不是整个页面
这是我的代码:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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 :)
通过设计,提交按钮将产生刷新页面的影响,除非您使用诸如客户端脚本之类的内容来超越此行为。
像 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'