摘要: var o=[o]; var obj={}; var fn=function(){}; var v=''; var object=new K();//Boolean()http://wenku.baidu.com/view/823b8b0a7cd184254b353534.html 阅读全文
posted @ 2013-04-01 23:32 microsoftzhcn 阅读(150) 评论(0) 推荐(0) 编辑
摘要: var arr = new Array();arr[0] = "aaa";arr[1] = "bbb";arr[2] = "ccc";//alert(arr.length);//3arr.pop();//alert(arr.length);//2//alert(arr[arr.length-1]);//bbbarr.pop();//alert(arr[arr.length-1]);//aaa//alert(arr.length);//1var arr2 = new Array();//alert(arr2.length);//0arr 阅读全文
posted @ 2013-04-01 23:14 microsoftzhcn 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 一、单模块文件-自执行()1、每个文件必须要以模块的形式定义,模块标识与文件所在目录一定要对应。如:以下为/static/js目录,文件名为fn.js,模块名称为/static/js/fn.jsF.module("/static/js/fn.js",function (e, c) { (function () { alert('hello'); })()},[]);2、调用标识与模块标识一定要对应,如果浆文件不在同一文件时,加载资源文件的同时调用模块标识。F.use('/static/js/fn.js');附件下载F.module(" 阅读全文
posted @ 2013-04-01 15:27 microsoftzhcn 阅读(563) 评论(0) 推荐(0) 编辑
摘要: 1、方法定义 call方法: 语法:call([thisObj,arg1, arg2,arg……n]) ,参数arg只能为列表的形式,如:a,b,c定义:调用一个对象的一个方法,以另一个对象替换当前对象。 说明: call 方法可以用来代替另一个对象调用一个方法。call 方法可将一个函数的对象上下文从初始的上下文改变为由 thisObj 指定的新对象。 如果没有提供 thisObj 参数,那么 Global 对象被用作 thisObj。 apply方法: 语法:apply([thisObj,[argArray,arguments]]) ,参数age只能为数组或arguments的形式,如:[ 阅读全文
posted @ 2013-04-01 12:46 microsoftzhcn 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 避免编写解决"不存在"问题的代码。即在项目开发中仅仅只编写与你问题相关的代码,而不是刻意添加与问题不相关的代码。如果你认为所做的代码能达到通用的层次,则建议将它封装到工具类中,而不是散列到各个业务文件中。这样可以更好的维护代码和提高重用性。<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="ht 阅读全文
posted @ 2013-04-01 10:40 microsoftzhcn 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 方法1 #region 静态javascript脚本 const string sScript=@"<script type=""text/javascript"" language='javascript'> ... </script>protected override void Render(HtmlTextWriter output) { output.Write(sScript); }方法2using(StreamReader reader = new StreamReader(this.Get 阅读全文
posted @ 2013-04-01 10:07 microsoftzhcn 阅读(201) 评论(0) 推荐(0) 编辑