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
相关文档:
下面都是我收集的一些比较常用的正则表达式,因为平常可能在表单验证的时候,用到的比较多。特发出来,让各位朋友共同使用。呵呵。
匹配中文字符的正则表达式: [u4e00-u9fa5]
评注:匹配中文还真是个头疼的事,有了这个表达式就好办了
匹配双字节字符(包括汉字在内):[^x00-xff]
评注:可以用来计算字符串的长度(一个 ......
Technorati 标签: 电脑相关
原文地址:http://www.playes.net/Blog/535.asp
IE 浏览器的脚本失效是个源远流长的问题了,有时撞上了那也只能归结于缘分,完全没得解释。这次本人就是中大彩的缘分,被小小地撞了一下腰。
当然脚本失效也有轻重,有时是页面全部烂晒,图片文字全部显示错位,惨不忍睹,其实坏的这么彻底反 ......
1. SproutCore
SproutCore 苹果对SproutCore的解释为“开源,平台无关,类Cocoa的JavaScript框架,用于创建具有桌面应用程序外观和操作感的Web应用程序。”
SproutCore demonstrations: Photos, Sample Controls
2. Spry
Spry 是Adobe 的 Ajax framework. Spry的目的是成为实现Ajax的一种简单方式,对HTML、C ......
javascript中的面像对像。
请看代码,下面弹出一个对话筐。
<script type="text/javascript">
function win(w, h,,url)
{
this.widt ......
数组属于JavaScript中的复合数据类型。
JavaScript中一个数组可以存储JavaScript支持的任何数据类型,比如可以用一个数组来处理用户从中选择的项目列表,或者一组图像坐标,或者一组图片的引用。
创建Array对象并初始化 ......