摘要: 定义Circle类,拥有成员变量r,常量PI和计算面积的成员函数area()Javascript代码//第1种写法function Circle(r) {this.r = r;}Circle.PI = 3.14159;Circle.prototype.area = function() {return Circle.PI * this.r * this.r;}var c = new Circle(1.0);alert(c.area());Javascript代码//第2种写法var Circle = function() {var obj = new Object();obj.PI = 3.1 阅读全文
posted @ 2011-05-04 15:07 itor 阅读(285) 评论(0) 推荐(0) 编辑
摘要: select * from dbo.sysobjectswhere id in (select id from dbo.syscolumns where name = '字段名) 阅读全文
posted @ 2011-03-10 12:29 itor 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 页面生命周期页面生命周期执行一系列步骤:页面的初始化、实例化控件、还原和维护状态、运行事件处理程序代码、呈现。为了在合适的阶段执行所需的代码,所以要对页面生命周期非常熟悉。在页生命周期的各个阶段,页面会逐个引发定义的事件,通过对代码开发,在页面的生命事件中执行我们所需要的程序页生命周期阶段1、页请求:发生在页面生命周期之前,用户请求页时,ASP.NET将确定是否需要分析和编译页,从而确定是否开始页... 阅读全文
posted @ 2010-11-25 11:19 itor 阅读(174) 评论(0) 推荐(0) 编辑
摘要: <styletype="text/css"><!--div{position:absolute;/*绝对定位*/top:50%;/*距顶部50%*/left:50%;/*距左边50%*/height:200px;margin-top:-100px;/*margin-top为height一半的负值*/width:400px;margin-left:-200px;/*margin-l... 阅读全文
posted @ 2010-09-14 20:45 itor 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 非模态刷新父页面:window.opener.location.reload(); 模态刷新父页面:window.dialogArguments.location.reload(); 先来看一个简单的例子: 下面以三个页面分别命名为frame.html、top.html、bottom.html为例来具体说明如何做。 frame.html 由上(top.html)下(bottom.html)两个... 阅读全文
posted @ 2010-09-10 13:43 itor 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 如果用的模式窗体,可以用window.dialogArguments.location.reload()如果子页面是普通的页面,则用 window.opener.location.reload() 阅读全文
posted @ 2010-09-10 12:57 itor 阅读(284) 评论(0) 推荐(0) 编辑
摘要: copy /V "$(TargetDir)$(TargetName).dll" "..\..\..\..\Bin\" if Exist $(TargetDir)$(TargetName).pdb copy /V "$(TargetDir)$(TargetName).pdb" "..\..\..\..\Bin\"if Exist $(TargetDir)$(TargetName).xml copy ... 阅读全文
posted @ 2010-09-02 09:52 itor 阅读(405) 评论(0) 推荐(0) 编辑
摘要: Create PROCEDURE Pagination @tblName varchar(255), -- 表名 @strGetFields varchar(1000) = '*', -- 需要返回的列 @fldName varchar(255)='', -- 排序的字段名 @PageSize int = 10, -- 页尺寸 @PageIndex int = 1, -- 页码 @doCount ... 阅读全文
posted @ 2010-07-16 15:51 itor 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Output Caching: 当一个网页频繁被访问的时候,我们可以通过把"整个网页"缓存来提高执行效率。这样作的优点是,当用户(包括其它用户)再次访问这个网页的时候,被格式化好的HTML会被直接送显。 由于IIS的一些特性,默认情况下Output Cache是打开的(IIS会根据网站的总访问量估数出需要缓存多少数据,怎么缓存,缓存时间有多少),但是要对某些请求进行缓存,还需要开发者进行定制(编程... 阅读全文
posted @ 2010-05-28 12:40 itor 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 正常的cookie只能在一个应用中共享,即一个cookie只能由创建它的应用获得。 1.可在同一应用服务器内共享方法:设置cookie.setPath("/"); 本机tomcat/webapp下面有两个应用:cas和webapp_b, 1)原来在cas下面设置的cookie,在webapp_b下面获取不到,path默认是产生cookie的应用的路径。 2)若在cas下面设置cookie的时候,增... 阅读全文
posted @ 2010-05-28 09:53 itor 阅读(220) 评论(0) 推荐(0) 编辑