易截截图软件、单文件、免安装、纯绿色、仅160KB

JavaScript动态生成树形菜单创建表格

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title>无限级树形菜单</title>
<mce:style><!--
#A1 td { vertical-align: top; }
#A1 td.bj { font-family: Wingdings; color: #FF9933; text-align: center; }
#A1 td.bj , #A1 td.kg { width: 24; }
#A1 a:link , #A1 a: visited { color: #cc0080; text-decoration: none; }
#A1 a:hover { color: #0ff080; text-decoration: none; }
--></mce:style><style mce_bogus="1">#A1 td { vertical-align: top; }
#A1 td.bj { font-family: Wingdings; color: #FF9933; text-align: center; }
#A1 td.bj , #A1 td.kg { width: 24; }
#A1 a:link , #A1 a: visited { color: #cc0080; text-decoration: none; }
#A1 a:hover { color: #0ff080; text-decoration: none; }</style>
<mce:script language="JavaScript"><!--
function m_start(name,tt) //菜单组开始
{
document.writeln('<tr><td class="bj">'+(tt==1?'1':'0')+'</td>');
document.writeln('<td><a href="#" mce_href="#" onclick="zgmm()">'+name+'</a></td>');
document.writeln('</tr>');
document.writeln('<tr style="display: '+(tt==1?'block':'none')+';" mce_style="display: '+(tt==1?'block':'none')+';">');
document.writeln('<td class="bj"> </td>');
document.writeln('<td>');
document.writeln('<table border="0" cellpadding="0" cellspacing="0">');
}
function m_end() //菜单组结束
{
document.writeln('</table></td></tr>');
}
function add_Sub(name,url,kj) //添加菜单项
{
document.writeln('<tr><td class="bj">2</td><td>');
document.writeln('<a target="'+kj+'" href="'+url+'" mce_href="'+url+'">'+name+'</a>');
document.writeln('</td></tr>');
}
functi


相关文档:

javascript 字符串处理全攻略


文章分类:
JavaScript
文章标题:
javascript 字符串处理全攻略
关  键 字:
0
文章作者:
alonglee
文章来源:
http://lmgq.vip.sina.com/tech/jsadvancedlesson/c2p1.htm

发表时间:
2004-9-21 14:43:00


一、声明字符串:
var normal_monkey = "I&n ......

JavaScript性能优化之循环操作

JavaScript中有四种不同类型的循环,for循环、do-while循环和while循环。(第四种类型为for-in循环,用于迭代对象的属性,本文不予讨论。)代码如下:
var values = [1, 2, 3, 4, 5];
//for 循环
for(var i=0; i<values.length; i++){
process(values[i]);
}
//do-while 循环
var j=0;
do{
process(values[j++] ......

JavaScript判断上传文件的大小

<form     name="form1">  
  <input type="file"     name="file1"     onchange="checkimage
(value)">  
  </form>  
  <script     language="javasc ......

基于javascript的用户登录页面验证

1,用户名不能包含空格,第一个字母不能为数字,长度控制
2,密码和验证码要相同,不能为空,等等,一些很基本的功能,但是确实挺烦人的。
      javascript调试起来确实比较麻烦。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<T ......

写的第一个较有意义Javascript程序

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>javascript</t ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号