树型菜单在很多桌面应用系统中都有非常广泛的应用,其主要优点是结构清晰,利于使用者非常清楚的知道目前自己所在的位置。但在web上树型菜单的应用因为没有理想的现成组件可以拿过来直接使用,所以一般的情况下,程序员主要是通过JavaScript来实现一些简单的树型结构菜单,但这些菜单往往都是事先定好各菜单项目,以及各菜单项目之间的层次关系,不利于扩充,一旦需要另一个菜单结构时,往往还需要重新编写,因此使用起来不是很方便。 经过对函数递归的研究,我发现这种树型菜单可以通过递归函数,使树型菜单的显示实现动态变化,并没有级数的限制。下面就...
http://www.jb51.net//article/1453.htm
[code]<script language="JavaScript1.2">//-- 控制层删除start of script -->function ssdel(){if (event){lObj = event.srcElement ;while (lObj && lObj.tagName != "DIV") lObj = lObj.parentElement ;}v...
http://www.jb51.net//article/1421.htm
类名:AJAX [code]/*类名:AJAX创建方法:var ajaxobj=new AJAX;,如果创建失败则返回false属性:method - 请求方法,字符串,POST或者GET,默认为POST url - 请求URL,字符串,默认为空 async - 是否异步,true为异步,false为同步,默认为true content &n...
http://www.jb51.net//article/1397.htm
[code]<%Public Function UbbCode(strContent) Dim re Set re = New RegExp re.IgnoreCase = True &n...
http://www.jb51.net//article/1389.htm
[code]<%Dim CmdSet Cmd = New Cls_CommandClass Cls_Command Private Re Public Function IsPositiveInteger(value) Set Re = New RegExp &nbs...
http://www.jb51.net//article/1328.htm
///<summary> ///去除HTML标记 ///</summary> ///<paramname="strHtml">包括HTML的源码</param> ///<returns>已经去除后的文字</returns> publicstaticstringStripHTML(stringstrHtml) { string[]aryReg={ &nbs...
http://www.jb51.net//article/1292.htm
给大家介绍几个.NET中Path类的几个方法:1. Path.combine(string,string) 根据给出的两个路径,返回一个路径. 例如: stringCompletePath=System.IO.Path.Combine(@"c:\MyApp",@"Images\skyline.jpg"); 将会返回一个全路径c:\MyApp\Images\skyline.jpg &...
http://www.jb51.net//article/1231.htm
[code]<% ’用途:將UTF-8編碼漢字轉換為GB2312碼,兼容英文和數字 ’版權:雖說是原創,其實也參考了別人的部分算法 ’用法:Response.write UTF2GB("%E9%83%BD%E5%B8%82%E6%83%85%E7%B7%A3 %E6%98%9F%E5%BA%A7") function UTF2GB(UTFStr) for Dig=1 to len(UTFStr) if mid(UTFStr,Dig,1)="%" th...
http://www.jb51.net//article/1089.htm
javascript不能支持函数的重载,如下:[code]<script language="JavaScript">function f(length){ alert("高为:"+length);}function f(length,width){ alert("高为:"+length+",宽为:"+width);}</srcipt>[/code]上面那段代码其实是行不通的,因为函数定义时的参数个数和函数调用时的参数个数没有任何关系。 在...
http://www.jb51.net//article/1081.htm
[code]<!--//ASP分页函数function ShowListPage(page,Pcount,TopicNum,maxperpage,strLink,ListName){ var alertcolor = ’#FF0000’; maxperpage=Math.floor(maxperpage); TopicNum=Math.floor(TopicNum);  ...
http://www.jb51.net//article/1077.htm
window.attachEvent(’onload’,LoadDiv);function LoadDiv(){if (document.getElementById("Bunny2")){document.getElementById("Bunny2").innerHTML=’<script type="text/javascript" src="../../inc/BunnyFav.js"></script>s’;document.getElementById("Bunny2").innerHTML=’3<scr’&nb...
http://www.jb51.net//article/1046.htm
