javascript
共 8 篇文章
常用的jQuery插件或JS角本(主要以丰富前台展现效果)
fckeditor 不用多说 facebox Jquery插件弹出层,用起来很方便,效果也很不错,而且可以自己修改CSS来修改样式,最主要的,上手容易,角本文件很小 jquery.validate 我感觉很好用的表单验证的Jquery插件,我在也不用因为表单验证写好多好多无聊的JS了 jQuery UI.Layout 网页布局的jquery插件
2010-12-22 16:25 · javascript
使用facebox弹出层
<html> <head> <link href="${cssPath}/facebox.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript" src="${jsPath}/jquery-1.3.2.js"></script> <script language="javascript" type="text/javascript" src="${jsPath}/facebox.js"></script> <script language="javascript…
2010-10-20 11:41 · javascript
使用uploadify进行上传
<html> <bead> <link href="${cssPath}/uploadify.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript" src="${jsPath}/jquery-1.3.2.js"></script> <script type="text/javascript" src="${jsPath}/uploadify/swfobject.js"></script> <script type="text/javascript" src="…
2010-10-20 11:20 · javascript
只可输入数字的文本框
参考: http://www.cnblogs.com/ljhong/archive/2008/09/22/1296127.html <input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
2010-10-11 14:00 · javascript
javascript字符串处理
转至 http://blog.minidx.com/2008/01/07/355.html 函数:split() 功能:使用一个指定的分隔符把一个字符串分割存储到数组 例子: str=”jpg|bmp|gif|ico|png”; arr=theString.split(”|”); //arr是一个包含字符值”jpg”、”bmp”、”gif”、”ico”和”png”的数组 函数:John() 功能:使用您选择的分隔符将一个数组合并为一个字符串 例子: var delimitedString=myArray.join(delimiter); var myList=new Array(”jpg”,…
2010-10-11 13:57 · javascript
javascript多重继承小例子(zInherit工具)
function ClassX(){ this.messageX = "This is the X message. "; if(typeof ClassX._initialized == "undefined"){ ClassX.prototype.sayMessageX = function(){ alert(this.messageX); }; ClassX._initialized = true; } } function ClassY(){ this.messageY = "This is the Y message. "; if(typeof ClassY._initialize…
2010-04-15 15:29 · javascript
javascript继承小例子(动态原型方法)
function Polygon(iSides){ this.sides = iSides; if(typeof Polygon._initialized == "undefined") { Polygon.prototype.getArea = function(){ return 0; }; Polygon._initialized = true; } } function Triangle(iBase , iHeight){ Polygon.call(this , 3); this.base = iBase; this.height = iHeight; // Triangle._in…
2010-04-15 04:38 · javascript
javascript继承小例子(原型链与对象冒充)
function ClassA(sColor){ this.color = sColor; } ClassA.prototype.sayColor = function(){ alert(this.color); }; function ClassB(sColor , sName){ // 使用call继承ClassA构造中定义的属性和方法(对象冒充) ClassA.call(this , sColor); this.name = sName; } // 这种方式将继承ClassA中prototype中的属性和方法(原型链) ClassB.prototype = new ClassA(); …
2010-04-13 02:11 · javascript