01 2009 档案

摘要:站点根目录:System.Web.HttpContext.Current.Server.MapPath("/") 阅读全文
posted @ 2009-01-16 16:23 T#S 阅读(729) 评论(0) 推荐(0)
摘要:<div>detachEvent</div>1     window.onload = function(){2       var oDiv = document.getElementById("contentDiv");3       var func = function(){4         alert(oDiv.innerHTML);5       }6    ... 阅读全文
posted @ 2009-01-16 11:44 T#S 阅读(5233) 评论(2) 推荐(0)
摘要:A)location.replace('newurl')B)<body onbeforeunload="window.location.replace('')">C)Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache)D) <META HTTP-EQUIV="Pragma" CONTENT="no-... 阅读全文
posted @ 2009-01-15 22:04 T#S 阅读(243) 评论(0) 推荐(0)
摘要:添加 Microsoft.VisualBasic引用/// <summary> /// 转换为简体中文 /// </summary> public static string ToSChinese(string str) { return Strings.StrConv(str, VbStrConv.SimplifiedChinese, 0); } /// <s... 阅读全文
posted @ 2009-01-15 14:39 T#S 阅读(765) 评论(0) 推荐(0)
摘要:1.Date属性(1):constructor 所建立对象的函数参考prototype 能够为对象加入的属性和方法方法(43):getDay() 返回一周中的第几天(0-6)getYear() 返回年份.2000年以前为2位,2000(包含)以后为4位getFullYear() 返回完整的4位年份数getMonth() 返回月份数(0-11)getDate() 返回日(1-31)getH... 阅读全文
posted @ 2009-01-15 14:24 T#S 阅读(1030) 评论(0) 推荐(0)
摘要:实现String对象的Trim功能:<SCRIPT LANGUAGE="JavaScript"><!--//出处:网上搜集// Trim() , Ltrim() , RTrim()String.prototype.Trim = function(){return this.replace(/(^\s*)|(\s*$)/g, "");}String.prototype.LTrim ... 阅读全文
posted @ 2009-01-15 14:17 T#S 阅读(367) 评论(0) 推荐(0)
摘要:JS:functioncheckWord(len){varsrc=window.event.srcElement;varstr=trim(src.value);myLen=0;i=0;for(;(i<str.length)&&(myLen<=len);i++){if(str.charCodeAt(i)>0&&str.charCodeAt(i)<... 阅读全文
posted @ 2009-01-09 15:09 T#S 阅读(286) 评论(0) 推荐(0)
摘要:1.arguments是js的内置对象。2.在不确定对象是可以用来重载函数。3.用法如下:function goTo(){var i=arguments.length;alert(i);for(var m=0;m<i;m++){alert(arguments[m]);}}goTo('Hello','World');输出结果:2;Hello;World; 阅读全文
posted @ 2009-01-08 15:55 T#S 阅读(1071) 评论(0) 推荐(0)
摘要:实现脚本如下:<script type="text/javascript"><!--// function goTo() { var newA = document.createElement("a"); newA.id='gg' newA.target='_blank'; newA.href='http://www.google.com'; document.body.appe... 阅读全文
posted @ 2009-01-08 15:34 T#S 阅读(6594) 评论(1) 推荐(0)
摘要:1.页面继承ICallbackEventHandler接口。2.编写服务器端代码:#region ICallbackEventHandler string result = string.Empty; string ICallbackEventHandler.GetCallbackResult() { return result; } void ICallbackEventHandler.Rai... 阅读全文
posted @ 2009-01-08 14:42 T#S 阅读(287) 评论(0) 推荐(0)