JavaScript 三级级联菜单
< HTML >
< HEAD >
< TITLE > 合同申请 </ TITLE >
< meta http-equiv ="Content-Type" content ="text/html; charset=gb2312" >
< SCRIPT LANGUAGE = JavaScript >
/* * Define object Dsy 构造器
fieldValues - 三个表单域的名称, 可以通过 request.getParameter(xxx) 取值
defalutOptions - 默认选项
*/
function Dsy(fieldValues, defalutOptions){
this .Items = {};
this .defalutOptions = defalutOptions; // 默认选项
this .fieldValues = fieldValues; // 三个表单域的名称
}
Dsy.prototype.add = function (id, iArray){
this .Items[id] = iArray;
}
Dsy.prototype.Exists = function (id){
if ( typeof ( this .Items[id]) == " undefined " )
return false ;
return true ;
};
Dsy.prototype.setup = function () {
this .bean_change( 0 );
}
// This prototype method added by BeanSoft Studio
Dsy.prototype.bean_change = function (v){
var str = " 0 " ;
for (i = 0 ; i < v; i ++ ){
str += ( " _ " + (document.getElementById( this .fieldValues[i]).selectedIndex - 1 ));
};
var ss = document.getElementById( this .fieldValues[v]);
// Avoid a null exception
if (ss == null ) return ;
with (ss){
length = 0 ;
options[ 0 ]&nb
相关文档:
1: 遍历并输出Table中值
<table id="tb">
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</ ......
正则表达式是一个描述字符模式的对象。
JavaScript的RegExp对象和String对象定义了使用正则表达式来执行强大的模式匹配和文本检索与替换函数的方法.
'***********************
' \\JavaScript//
'
'***********************
在JavaSc ......
1. SproutCore
SproutCore 苹果对SproutCore的解释为“开源,平台无关,类Cocoa的JavaScript框架,用于创建具有桌面应用程序外观和操作感的Web应用程序。”
SproutCore demonstrations: Photos, Sample Controls
2. Spry
Spry 是Adobe 的 Ajax framework. Spry的目的是成为实现Ajax的一种简单方式,对HTML、C ......
首先在body中加入以下HTML内容:
<div id="panel">
<div id="top">
<ul id="menu">
<li id="1">Home</li>
&n ......