WEB开发网
开发学院WEB开发PHP 层叠菜单的动态生成 阅读

层叠菜单的动态生成

 2001-06-11 11:46:49 来源:WEB开发网   
核心提示:<HTML><BODY BGCOLOR=FFFFFF> <FORM ACTION="<?php echo $PATH_INFO?>" METHOD=POST> <?php if (isset($hierarchy)){ //$hierarchy[
<HTML><BODY BGCOLOR=FFFFFF>
<FORM ACTION="<?php echo $PATH_INFO?>" METHOD=POST>
<?php
 if (isset($hierarchy)){
   //$hierarchy[] = $selection;
   if (isset($hierarchy)){
    while(list($level, $sel) = each($hierarchy)){
     echo "<INPUT TYPE=HIDDEN NAME=hierarchy[$level] VALUE=$sel>";
     echo $level, ': ', $sel, "<BR>n";
     $nextlevel = (int) $level + 1;
    }
  }
 }
 else{
   $nextlevel = 0;
 }
 echo "<SELECT NAME=hierarchy[", $nextlevel, "]>n";
 for ($I = 1; $I <= 10; $I++){
  echo "<OPTION VALUE=$I>$I</OPTION>n";
 }
 echo "</SELECT>n";
?>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY></HTML> 

Tags:层叠 菜单 动态

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接