首页 > 网站 > 建站经验 > 正文

J!SP页面文件目录树源码(递归算法)

2019-11-02 14:14:05
字体:
来源:转载
供稿:网友

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>

<html>

<head>

<title></title>

<meta http-equiv="Content-Type" content="text/html;charset=gb2312"; >

<script language="JavaScript">

<!--

function MM_goToURL() { //v3.0

var i, args=MM_goToURL.arguments; document.MM_returnValue = false;

for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");

}

//-->

</script>

<link href="css/ip.css" rel="stylesheet" type="text/css">

</head>

 

<body topmargin = "0" leftmargin = "0" marginheight = "0" marginwidth = "0" bgcolor="#FFFFFF">

<table border="0" cellspacing="0" cellpadding="0" height="80%">

<tr><td>

</td>

</tr>

<tr valign="top">

<td height="223"> <span id="menus"></span>

<span id="view"></span>

 

</td>

</tr>

<tr valign="bottom&qu

全能影视[www.aikan.tv/special/quannenyingshi/]
ot;>

<td>&nbsp;</td>

</tr>

</table>

<div align="right"></div>

</body>

<script>

/**

* 构造树,初值为0

*/

function isbrother()

{

var is=flase;

 

}

function tree(n) {

var id = new Array("bar","pad","<IMG src='http://www.webjx.com/htmldata/2005-08-02/images/midnodeline.gif'border=0 align='absmiddle'><IMG src='http://www.webjx.com/htmldata/2005-08-02/images/close.gif 'border=0 align='absmiddle'>","<IMG src='http://www.webjx.com/htmldata/2005-08-02/images/midclosedfolder.gif 'border=0 align='absmiddle'><IMG src='http://www.webjx.com/htmldata/2005-08-02/images/close.gif 'border=0 align='absmiddle'>","<IMG src='http://www.webjx.com/htmldata/2005-08-02/images/lastnodeline.gif'border=0 align='absmiddle'><IMG src='http://www.webjx.com/htmldata/2005-08-02/images/close.gif 'border=0 align='absmiddle'>");

if(n == 0) { // 初始化变量

n = 1;

i = 0;

s = "";

}

s += "<table border=0 cellspacing=0 cellpadding=0 >";

for(;i<tree_ar.length-1;i++) {

var k = (n >= tree_ar[i+1][0])?0:1;

if(tree_ar[i][2]==false)

{

id[2]="<IMG src='http://www.webjx.com/htmldata/2005-08-02/images/lastnodeline.gif'border=0 align='absmiddle'><IMG src='http://www.webjx.com/htmldata/2005-08-02/images/close.gif 'border=0 align='absmiddle'>";

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表