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>
</ ......
SCRIPT 标记
用于包含JavaScript代码.
属性
LANGUAGE 定义脚本语言
SRC 定义一个
URL用以指定以.JS结尾的文件
window对象
每个HTML文档的顶层对象.
属性
frames[] 子桢数组.每个子桢数组按源文档中定义的顺序存
放.
f ......
<html>
<body>
<style>
ul,li{margin: 0; padding: 0;width:100%;}
</style>
<script language="javascript" type="text/javascript">
function checkword()
{
var wordvalue=document.getElementById("word").value.toLowerCase();
var alltxt="管理员| ......
/********************************************************************************/
//javascript在两个浮点数运算的时候会有比较明显的误差。增加下列方法解决。
//2009-07-18 Skyeah
//除法函数,用来得到精确的除法结果
//说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回 ......