SOR写道:SOR wrote:< comp.lang.php,rigga, ri***@hasnomail.com > < 42 *********************** @ ptn-nntp-reader01.plus.net> <星期五,2005年7月8日19 :12:36 + 0100> <comp.lang.php , rigga , ri***@hasnomail.com> <42***********************@ptn-nntp-reader01.plus.net> <Fri, 08 Jul 2005 19:12:36 +0100>最好的方法是什么?我已经把它编码为很长的路要走,这里有很多重复的代码。 我希望这一切都有意义并且我已经清楚地解释了它。 我是php的新手,所以非常感谢你的帮助,因为我完全不知道如何做到这一点。 What is the best way to go about this? I have coded it ''the long way'' where there is lots of duplication of code. I hope this all makes sense and that I have explained it clearly. I am new to php so would really appreciate your help as I am totally at a loss on how to best do this. 使用包含应该是它非常容易 - 即使对于像我这样的新手。 blah.php?pass = 1在您的主要组链接上。 假设您有导航菜单作为包含,你可以做一个'if''并且如果值为1则显示额外的子菜单链接。 虽然,你需要在所有子链接上都有?pass = 1或者当你点击子链接时,子菜单会消失。 作为一个家伙php新手我发现首先工作然后试图调整和罚款以后调整它可能很有用。 Using includes should make it quite easy - even for a newbie like me . blah.php?pass=1 on your main group link . Assuming you have the nav menu as a include you could do a ''if'' and if the value is 1 then display the extra sub menu links . Although , You would need the ?pass=1 on all the sub links as well or the sub menu would disappear when you clicked on sub link . As a fellow php newbie i''ve found getting stuff working first and then trying to tweak and fine tune it later can be useful . 你能进一步解释一下吗?我怎样才能使它成为活跃的链接?Could you explain further?, how would I get it to highlite the active link?< comp.lang.php,rigga, ri *** @ hasnomail.com > < 42 ********************** @ ptn-nntp-reader04.plus.net> <星期六,09七月2005 09:11:39 + 0100><comp.lang.php , rigga , ri***@hasnomail.com><42**********************@ptn-nntp-reader04.plus.net><Sat, 09 Jul 2005 09:11:39 +0100>你能进一步解释一下吗?我怎样才能让它成为活跃的链接? Could you explain further?, how would I get it to highlite the active link? www.snipe.net 这个家伙导航菜单使用你想做的事情 - 它可能值得一封电子邮件,要求他提供源代码作为他的方法 可能比我的好。 www.snipe.net this guys nav menu uses the sort of thing you want to do -it might be worth a email to ask him for the source code as his methodis probably better than mine . 这篇关于需要帮助来编码折叠菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-14 20:16