javascript读取xml实现应用程序菜单效果
/*样式*/
<style type="text/css">
td{font-size:12px;}
.item{text-decoration:none;width:100%;height:100%; line-height:22px;cursor:default;color:Black;vertical-align:middle}
.staticTab{cursor:default;height:22px}
.staticTD{width:70px;text-align:center; vertical-align:middle;white-space:nowrap}
.dynamicTR{height:22px; vertical-align:middle}
.dynamicTab{width:60px;cursor:default;background-color:#ccebff;position:absolute;z-index:1}
.dynamicTDRight{text-align:right;font-size:9px;}
.dynamicTDCenter{text-align:left;white-space:nowrap}
</style>
/*--------------菜单应用到的js--------------------*/
var menuHTML="";
function createXMLHttpRequest(){xmlHttp=(window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();}
function getMenuData(){//从后太获取头部的单据或审批人等的信息
createXMLHttpRequest();
xmlHttp.open("GET","Menu.ashx?id="+(new Date()).getTime(),true);
xmlHttp.onreadystatechange=getMenu_onreadystatechange;//用函数名,不加括号.
xmlHttp.send(null);
}
function getMenu_onreadystatechange(){//相应处理
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var menuXML=xmlHttp.responseXML.getElementsByTagName("menu");//childNodes
createStaticMenu(menuXML[0]);
}else
alert('服务器端发生错误!');
}
}
function getId(number,fatherId){
number+=1;
if(number<1
相关文档:
面向对象已不再是指封装、继承、抽象等设计方法,目前已经涉及到面向对象的分析(OOA,Object Oriented Analysis),面向对象的设计(OOD,Object Oriented Design)及面向对象的编程实现(OOP,Object Oriented Programming)。本片文章主要讨论的是如何实现Javascript的面向对象设计。
Javascript是脚本语言,是基于对象 ......
原文:JavaScript - The this keyword
在 JavaScript 中 this 是最强的关键字之一。这篇贴文就是要告诉你如何用好 this。
下面先讲如何在event handling
(事件处理)中用它,再接着是讲 this 的其他用法。
所有者(Owner)
先来看看函数 doSomething() 里的 this 究竟指向(refer to)了什么?
function doSomething() { ......
引言
我们已经探讨过了必要的程序设计核心概念。现在是时候从细节中退出来,并高瞻远瞩地来看看你可以利用 JavaScript 来做些什么了——为什么你要花时间来学习这样一门复杂的功课,以及如何将其用到你的网页上?
过去的几年对我来说是一段有趣的时间,因为在这段时间里 JavaScript 的使用从一种边缘知识成为了 ......
<!---------<html>
<head>
<style type="text/css">
.tabheader table {
border-collapse: collapse; /* for IE */
border-spacing: 0; /* for N6 */
}
.tabheader table tr td {mar ......
在service(spring)中完成
step 1:
打开一个session
写 sql 语句,
注意点:写sql语句时,所查询的试图为:kangaroo_VW_UnitView,此试图的生成
有 kangaroo_unit表左连接到kangaroo_img表而生成。
step 2:
把所查询的符合条件的集合放入临时的ArrayList中,并对临时的ArrayList进行
迭代。
step 3:
把迭代出来的集 ......