那位老大有web导航条(javascript)的java封装类,争需???? 代码我没有,不过我想应该是从数据库中读出记录,然后排序后交给JAVASCRIPT处理的!数据库无非也就是"父--子"关系! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不是,我要是一个可以通过设置相应的属性生成相应的javascript代码作为输出的javabean,就像windows下的树型控件一样,只不过这是生成字符串输出而已,由于本人不会javascript,所以无从下手, 好像有个叫htmlKona的东西可以,不知道有没谁用过 应该没有这样的类,还是找类似的javascript修改用吧。其实jrun那个树状就不错 好的,是这样的,在用jsp+javabean中,是不是有些javabean可以生成定制html输出,当然也可以生成javascript,我现在想要一个可以生成树形导航条javascript代码的javabean,并且这个导航条是可以定制的,要求可以定义树的级别,可以通过jsp调用动态生成导航树。不知道有没有这种东西 不就是我说的JAVABEAN+数据库吗?!不用数据库怎么行呢!? 数据库好办,不是主要问题,我要的是在已知数据的情况下动态合成javascript代码输出,主要的难点是合成级别的定制 <html><head><title>Óû§Ö÷Ŀ¼</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link rel="stylesheet" href="css/globa.css"><script language="javascript" src="js/globa.js"></script><script language="JavaScript">NS4 = (document.layers) ? 1 : 0;//ÅжÏä¯ÀÀÆ÷ÊÇ·ñΪnetscapes4.0ÒÔÉÏIE4 = (document.all) ? 1 : 0;//ÅжÏä¯ÀÀÆ÷ÊÇ·ñΪIE4.0ÒÔÉÏver4 = (NS4 || IE4) ? 1 : 0;//ÅжÏä¯ÀÀÆ÷ÊÇ·ñΪÒÔÉÏÁ½ÕßÖ®Ò»if (ver4) //netscapes4.0»òie4.0ÒÔÉÏ°æ±¾{ with (document) { write("<STYLE TYPE='text/css'>"); if (NS4) { write(".parent {position:absolute; visibility:visible}"); write(".child {position:absolute; visibility:visible}"); write(".regular {position:absolute; visibility:visible}") } else //IE4.0ÒÔÉÏ°æ±¾ { write(".child {display:none}") } write("</STYLE>"); }}function initIt()//³õʼ»¯½«ËùÓеÄ×Ӳ㶼²»¿É¼û{ if (!ver4) return;//ÖжÏÖ´ÐÐ if (NS4) { for (i=0; i<document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide"; } } else { divColl = document.all.tags("DIV"); for (i=0; i<divColl.length; i++) { whichEl = divColl(i); if (whichEl.className == "child") whichEl.style.display = "none"; } }}function expandIt(el)//Õ¹¿ª»ò¹Ø±Õ{ if (!ver4) return; if (IE4) { whichEl = eval(el + "Child"); Whichpar=eval(el+"Parent"); if (whichEl.style.display == "none") { whichEl.style.display = "block"; for (i=0;i<window.Whichpar.all.length;i++) { if (window.Whichpar.all[i].tagName=="IMG") { window.Whichpar.all[i].src="images/min.gif"; } } } else { whichEl.style.display = "none"; for (i=0;i<window.Whichpar.all.length;i++) { if (window.Whichpar.all[i].tagName=="IMG") { window.Whichpar.all[i].src="images/max.gif"; } } } } else//netscapes4.0 { whichEl = eval("document." + el + "Child"); if (whichEl.visibility == "hide") { whichEl.visibility = "show"; } else { whichEl.visibility = "hide"; } }}function expandall(){ if (!ver4) return; if (IE4) { divColl = document.all.tags("DIV"); for (i=0; i<divColl.length; i++) { whichEl = divColl(i); if (whichEl.className == "child") whichEl.style.display = "block";//Èç¹ûÊÇ×Ó²ãÔòÏÔʾ else if (whichEl.className == "parent")//Èç¹ûÊǸ¸²ã¾Í¸Ä±äͼÏó { for (j=0;j<window.whichEl.all.length;j++) { if (window.whichEl.all[j].tagName=="IMG") { window.whichEl.all[j].src="images/min.gif"; } } } } } else { for (i=0; i<document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "show"; } }}function closeall(){ if (!ver4) return; if (IE4) { divColl = document.all.tags("DIV"); for (i=0; i<divColl.length; i++) { whichEl = divColl(i); if (whichEl.className == "child") whichEl.style.display = "none";//Èç¹ûÊÇ×Ó²ãÔò²»ÏÔʾ else if (whichEl.className == "parent")//Èç¹ûÊǸ¸²ã¾Í¸Ä±äͼÏó { for (j=0;j<window.whichEl.all.length;j++) { if (window.whichEl.all[j].tagName=="IMG") { window.whichEl.all[j].src="images/max.gif"; } } } } } else { for (i=0; i<document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide"; } }}</script><style type="text/css"><!--td { font-family: "·ÂËÎ_GB2312"; font-size: 14px; color: #000099; background-color: #000066; border-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px}table { margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px}--></style></head><body bgcolor="#000066" onload="initIt();"><center><a href="/help/help.html" target="_blank"><font face="·ÂËÎ_GB2312" size="5" color="#EAEAEA"><i><b>°ïÖúÊÖ²á</b></i></font></a><br><br><table align="left"><tr> <td><a href="#"><img src="images/closeall.gif" width="22" height="20" onclick="closeall();" border="0"></a></td> <br></tr><? if ($grade==1) echo("<tr><td><div id=\"ad_user\"> <IMG height=13 src=\"images/min.gif\" width=19><A href=\"ad_frame.php3\" target=_parent> ·µ»Ø¹ÜÀíÔ±Ò³Ãæ</a> </div></td></tr>");?><tr><td><div id="consumeParent" class="parent"><A href="#" onclick="expandIt('consume');"> <IMG border=0 height=12 src="images/max.gif" width=20> ¸öÈËÊÕÖ§¹ÜÀí</a> </div><div id="consumeChild" class="child"> <IMG height=13 src="images/filebox.gif" width=19><A href="us_income.php3" target=mainFrame>µ±ÔÂÊÕÈëµÇ¼Ç</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="us_cgincome.php3" target=mainFrame>µ±ÔÂÊÕÈëÐÞ¸Ä</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="us_addinc.php3" target=mainFrame>µ±Ô¶îÍâÊÕÈëµÇ¼Ç</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="us_cgaddinc.php3" target=mainFrame>µ±Ô¶îÍâÊÕÈëÐÞ¸Ä</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="us_addconsum.php3" target=mainFrame>µ±ÔÂÏû·ÑµÇ¼Ç</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="us_addinvest.php3" target=mainFrame>µ±ÔÂͶ×ʵǼÇ</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="us_cginvest.php3" target=mainFrame>µ±ÔÂͶ×ÊÐÞ¸Ä</a> </div><div id="searchParent" class="parent"> <A href="#" onclick="expandIt('search');"><IMG border=0 height=12 src="images/max.gif" width=20> ¸öÈ˲éѯÖÐÐÄ</a></div><div id="searchChild" class="child"> <IMG height=13 src="images/filebox.gif" width=19><A href="seh_income.php3" target=mainFrame>¸öÈËÊÕÈë²éѯ</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="seh_consum.php3" target=mainFrame>¸öÈËÏû·Ñ²éѯ</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="seh_invest.php3" target=mainFrame>¸öÈËͶ×ʲéѯ</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="seh_allmny.php3" target=mainFrame>¸öÈË×ʲú²éѯ</a></div><div id="usParent" class="parent"> <A href="#" onclick="expandIt('us');"><IMG border=0 height=12 src="images/max.gif" width=20> ¸öÈËÐÅÏ¢ÖÐÐÄ</a></div><div id="usChild" class="child"> <IMG height=13 src="images/filebox.gif" width=19><A href="modi_usinfo.php3" target=mainFrame>ÐÞ¸Ä×¢²áÐÅÏ¢</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="us_sysinfo.php3" target=mainFrame>ϵͳÌáʾÐÅÏ¢</a><br> <IMG height=13 src="images/filebox.gif" width=19><A href="del_user.php3" target=_parent>×¢ Ïú ×Ô ¼º</a></div></td></tr><tr><td><div id="logout"> <IMG height=13 src="images/exit.gif" width=19><A href="logout.php3" target=_parent> Í˳öϵͳ</a> </div></td></tr><tr> <td><a href="#"><img src="images/openall.gif" width="19" height="18" onclick="expandall();" border="0"></a> </td> </tr> </table><!----> <div id="footlayer" style="position:absolute; z-index:1; visibility: visible; left: 35px; top: 591px"><b><i><font color="#FF6699" face="·ÂËÎ_GB2312">»¶Ó­Ê¹Óñ¾ÏµÍ³£¡</font></i></b></div> <b><i><font color="#EAEAEA" face="·ÂËÎ_GB2312" size="2"> <div id="time" title="ϵͳµ±Ç°Ê±¼ä" style="position:absolute; z-index:2; left: 35px; top: 566px; visibility: visible"></div> </font></i></b></center></body><script>var tempdate=new Date();var Sseconds=tempdate.getSeconds();var Sminutes=tempdate.getMinutes();var Shours=tempdate.getHours();var Shalfs=0;function bl(Itime){ if (Itime<10) Itime='0'+Itime; return Itime;}function writeT(){ Shalfs++; Shalfs=Shalfs%2; STimev='µ±Ç°Ê±¼ä:'; ie4=(document.all)?true:false; if (Shalfs) { Sseconds++; if (Sseconds>59) { Sseconds=0; Sminutes++; if (Sminutes>59) { Sminutes=0; Shours++; if (Shours>23) Shours=0; } } STimev+=bl(Shours)+":"+bl(Sminutes)+":"+bl(Sseconds); } else STimev+=bl(Shours)+":"+bl(Sminutes)+" "+bl(Sseconds); if(ie4) { document.all['time'].innerHTML=STimev; setTimeout('writeT()',500); }}writeT();</script></html>希望对你有用! 这个我也有,看来只能用Applet,没有办法了 hello,mail to N级树-------解压----运行,OK?[email protected] JS正则验证问题 请教,关于腾讯空间的问题 div 滚动 支持键盘上下键 JS 正则表达式问题,保留一位小数,不四舍五入,如果是整数就匹配整数本身. 求助 JavaScript代码在Windows和Linux下访问的兼容性 请教一段简单的代码含义及几个属性 在JavaScript中如何获得一组radio中选中的value? 关于iframe的问题。 很低級問題﹐請都看看 如何生成随机数? window.open打开的窗体的一个问题 请问在netscape中如何指定新打开窗口的宽度和高度!
不用数据库怎么行呢!?
<head>
<title>Óû§Ö÷Ŀ¼</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/globa.css">
<script language="javascript" src="js/globa.js"></script>
<script language="JavaScript">
NS4 = (document.layers) ? 1 : 0;//ÅжÏä¯ÀÀÆ÷ÊÇ·ñΪnetscapes4.0ÒÔÉÏ
IE4 = (document.all) ? 1 : 0;//ÅжÏä¯ÀÀÆ÷ÊÇ·ñΪIE4.0ÒÔÉÏ
ver4 = (NS4 || IE4) ? 1 : 0;//ÅжÏä¯ÀÀÆ÷ÊÇ·ñΪÒÔÉÏÁ½ÕßÖ®Ò»if (ver4) //netscapes4.0»òie4.0ÒÔÉÏ°æ±¾
{
with (document)
{
write("<STYLE TYPE='text/css'>");
if (NS4)
{
write(".parent {position:absolute; visibility:visible}");
write(".child {position:absolute; visibility:visible}");
write(".regular {position:absolute; visibility:visible}")
}
else //IE4.0ÒÔÉÏ°æ±¾
{
write(".child {display:none}")
}
write("</STYLE>");
}
}
function initIt()//³õʼ»¯½«ËùÓеÄ×Ӳ㶼²»¿É¼û
{
if (!ver4) return;//ÖжÏÖ´ÐÐ
if (NS4)
{
for (i=0; i<document.layers.length; i++)
{
whichEl = document.layers[i];
if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
}
}
else
{
divColl = document.all.tags("DIV");
for (i=0; i<divColl.length; i++)
{
whichEl = divColl(i);
if (whichEl.className == "child") whichEl.style.display = "none";
}
}
}function expandIt(el)//Õ¹¿ª»ò¹Ø±Õ
{
if (!ver4) return;
if (IE4)
{
whichEl = eval(el + "Child");
Whichpar=eval(el+"Parent");
if (whichEl.style.display == "none")
{
whichEl.style.display = "block";
for (i=0;i<window.Whichpar.all.length;i++)
{
if (window.Whichpar.all[i].tagName=="IMG")
{
window.Whichpar.all[i].src="images/min.gif";
}
}
}
else
{
whichEl.style.display = "none";
for (i=0;i<window.Whichpar.all.length;i++)
{
if (window.Whichpar.all[i].tagName=="IMG")
{
window.Whichpar.all[i].src="images/max.gif";
}
}
}
}
else//netscapes4.0
{
whichEl = eval("document." + el + "Child");
if (whichEl.visibility == "hide")
{
whichEl.visibility = "show";
}
else
{
whichEl.visibility = "hide";
}
}
}
function expandall()
{
if (!ver4) return;
if (IE4)
{
divColl = document.all.tags("DIV");
for (i=0; i<divColl.length; i++)
{
whichEl = divColl(i);
if (whichEl.className == "child") whichEl.style.display = "block";//Èç¹ûÊÇ×Ó²ãÔòÏÔʾ
else if (whichEl.className == "parent")//Èç¹ûÊǸ¸²ã¾Í¸Ä±äͼÏó
{
for (j=0;j<window.whichEl.all.length;j++)
{
if (window.whichEl.all[j].tagName=="IMG")
{
window.whichEl.all[j].src="images/min.gif";
}
}
}
}
}
else
{
for (i=0; i<document.layers.length; i++)
{
whichEl = document.layers[i];
if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "show";
}
}
}
function closeall()
{
if (!ver4) return;
if (IE4)
{
divColl = document.all.tags("DIV");
for (i=0; i<divColl.length; i++)
{
whichEl = divColl(i);
if (whichEl.className == "child") whichEl.style.display = "none";//Èç¹ûÊÇ×Ó²ãÔò²»ÏÔʾ
else if (whichEl.className == "parent")//Èç¹ûÊǸ¸²ã¾Í¸Ä±äͼÏó
{
for (j=0;j<window.whichEl.all.length;j++)
{
if (window.whichEl.all[j].tagName=="IMG")
{
window.whichEl.all[j].src="images/max.gif";
}
}
}
}
}
else
{
for (i=0; i<document.layers.length; i++)
{
whichEl = document.layers[i];
if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
}
}
}
</script>
<style type="text/css">
<!--
td { font-family: "·ÂËÎ_GB2312"; font-size: 14px; color: #000099; background-color: #000066; border-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px}
table { margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px}
-->
</style>
</head>
<body bgcolor="#000066" onload="initIt();">
<center>
<a href="/help/help.html" target="_blank"><font face="·ÂËÎ_GB2312" size="5" color="#EAEAEA"><i><b>°ïÖúÊÖ²á</b></i></font></a><br><br>
<table align="left">
<tr>
<td><a href="#"><img src="images/closeall.gif" width="22" height="20" onclick="closeall();" border="0"></a></td>
<br>
</tr>
<?
if ($grade==1)
echo("<tr><td><div id=\"ad_user\"> <IMG height=13 src=\"images/min.gif\" width=19><A href=\"ad_frame.php3\" target=_parent> ·µ»Ø¹ÜÀíÔ±Ò³Ãæ</a> </div></td></tr>");?>
<tr>
<td>
<div id="consumeParent" class="parent"><A href="#" onclick="expandIt('consume');">
<IMG border=0 height=12 src="images/max.gif" width=20> ¸öÈËÊÕÖ§¹ÜÀí</a> </div>
<div id="consumeChild" class="child">
<IMG height=13 src="images/filebox.gif" width=19><A href="us_income.php3" target=mainFrame>µ±ÔÂÊÕÈëµÇ¼Ç</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="us_cgincome.php3" target=mainFrame>µ±ÔÂÊÕÈëÐÞ¸Ä</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="us_addinc.php3" target=mainFrame>µ±Ô¶îÍâÊÕÈëµÇ¼Ç</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="us_cgaddinc.php3" target=mainFrame>µ±Ô¶îÍâÊÕÈëÐÞ¸Ä</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="us_addconsum.php3" target=mainFrame>µ±ÔÂÏû·ÑµÇ¼Ç</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="us_addinvest.php3" target=mainFrame>µ±ÔÂͶ×ʵǼÇ</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="us_cginvest.php3" target=mainFrame>µ±ÔÂͶ×ÊÐÞ¸Ä</a>
</div>
<div id="searchParent" class="parent"> <A href="#" onclick="expandIt('search');"><IMG border=0 height=12 src="images/max.gif" width=20>
¸öÈ˲éѯÖÐÐÄ</a></div>
<div id="searchChild" class="child">
<IMG height=13 src="images/filebox.gif" width=19><A href="seh_income.php3" target=mainFrame>¸öÈËÊÕÈë²éѯ</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="seh_consum.php3" target=mainFrame>¸öÈËÏû·Ñ²éѯ</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="seh_invest.php3" target=mainFrame>¸öÈËͶ×ʲéѯ</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="seh_allmny.php3" target=mainFrame>¸öÈË×ʲú²éѯ</a>
</div>
<div id="usParent" class="parent"> <A href="#" onclick="expandIt('us');"><IMG border=0 height=12 src="images/max.gif" width=20>
¸öÈËÐÅÏ¢ÖÐÐÄ</a></div>
<div id="usChild" class="child">
<IMG height=13 src="images/filebox.gif" width=19><A href="modi_usinfo.php3" target=mainFrame>ÐÞ¸Ä×¢²áÐÅÏ¢</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="us_sysinfo.php3" target=mainFrame>ϵͳÌáʾÐÅÏ¢</a><br>
<IMG height=13 src="images/filebox.gif" width=19><A href="del_user.php3" target=_parent>×¢ Ïú ×Ô ¼º</a>
</div></td>
</tr>
<tr><td><div id="logout"> <IMG height=13 src="images/exit.gif" width=19><A href="logout.php3" target=_parent> Í˳öϵͳ</a> </div></td></tr>
<tr>
<td><a href="#"><img src="images/openall.gif" width="19" height="18" onclick="expandall();" border="0"></a>
</td>
</tr>
</table>
<!---->
<div id="footlayer" style="position:absolute; z-index:1; visibility: visible; left: 35px; top: 591px"><b><i><font color="#FF6699" face="·ÂËÎ_GB2312">»¶Ó­Ê¹Óñ¾ÏµÍ³£¡</font></i></b></div>
<b><i><font color="#EAEAEA" face="·ÂËÎ_GB2312" size="2">
<div id="time" title="ϵͳµ±Ç°Ê±¼ä" style="position:absolute; z-index:2; left: 35px; top: 566px; visibility: visible"></div>
</font></i></b>
</center>
</body>
<script>
var tempdate=new Date();
var Sseconds=tempdate.getSeconds();
var Sminutes=tempdate.getMinutes();
var Shours=tempdate.getHours();
var Shalfs=0;
function bl(Itime)
{
if (Itime<10) Itime='0'+Itime;
return Itime;
}
function writeT()
{
Shalfs++;
Shalfs=Shalfs%2;
STimev='µ±Ç°Ê±¼ä:';
ie4=(document.all)?true:false;
if (Shalfs)
{
Sseconds++;
if (Sseconds>59)
{
Sseconds=0; Sminutes++;
if (Sminutes>59)
{
Sminutes=0; Shours++;
if (Shours>23) Shours=0;
}
}
STimev+=bl(Shours)+":"+bl(Sminutes)+":"+bl(Sseconds);
}
else STimev+=bl(Shours)+":"+bl(Sminutes)+" "+bl(Sseconds);
if(ie4)
{
document.all['time'].innerHTML=STimev;
setTimeout('writeT()',500);
}
}
writeT();
</script>
</html>
希望对你有用!
[email protected]