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
相关文档:
scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......
1: 遍历并输出Table中值
<table id="tb">
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</ ......
javascript中的面像对像。
请看代码,下面弹出一个对话筐。
<script type="text/javascript">
function win(w, h,,url)
{
this.widt ......