2014年1月23日

ashx文件配置常量

摘要: private string _oper = string.Empty; private string _resp = string.Empty; /// /// jsoncallback 异步跨域参数 跨域必填!! /// private string strJsonp = string.Empty;//跨域关键 /// /// //不加小括号,jsonp加小括号 /// {0}\"RetStatus\":\"{1}\" ,\"RetResult\":\"{2}\"{3}" /// private st 阅读全文

posted @ 2014-01-23 09:23 slnt 阅读(178) 评论(0) 推荐(0) 编辑

2013年12月9日

验证文本框只能输入数字

摘要: 阅读全文

posted @ 2013-12-09 15:51 slnt 阅读(119) 评论(0) 推荐(0) 编辑

2013年11月12日

Chrome和Safari完美支持onfocus="this.select();" 解决方案

摘要: 阅读全文

posted @ 2013-11-12 14:21 slnt 阅读(539) 评论(1) 推荐(0) 编辑

2013年5月27日

自定义添加配置文件节点

摘要: 1 // Get the application configuration file. 2 Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); 3 string sectionName = "appSettings"; 4 5 // Add an entry to appSettings. 6 int appStgCnt = Conf... 阅读全文

posted @ 2013-05-27 13:41 slnt 阅读(199) 评论(0) 推荐(0) 编辑

2011年12月5日

计算字节大小函数

摘要: 1 ///<summary> 2 /// 计算字节大小函数,传入一以字节为单位的值。 3 /// </summary> 4 /// <param name="size">要计算的字节大小,单位为“字节”</param> 5 /// <returns>计算后的大小值</returns> 6 public string FormateSize(long size) 7 { 8 const double baseKB = 1024.00, baseMB = 1024 * 1024.00, bas... 阅读全文

posted @ 2011-12-05 15:58 slnt 阅读(750) 评论(0) 推荐(0) 编辑

2011年12月1日

获取当前用户的ip地址(精确,继...)

摘要: 1 public string GetUserIp 2 { 3 get 4 { 5 string ip; 6 string[] temp; 7 bool isErr = false; 8 if (HttpContext.Current.Request.ServerVariables["HTTP_X_ForWARDED_For"] == null) 9 ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToStri... 阅读全文

posted @ 2011-12-01 11:52 slnt 阅读(278) 评论(0) 推荐(0) 编辑

分享一个压缩js代码的工具

摘要: JS混淆加密压缩 阅读全文

posted @ 2011-12-01 09:31 slnt 阅读(172) 评论(0) 推荐(0) 编辑

2010年8月7日

div+css格式规范

摘要: 容器:container/box头部:header主导航:mainNav子导航:subNav顶导航:topNav网站标志:logo大广告:banner页面中部:mainBody底部:footer菜单:menu菜单内容:menuContent子菜单:subMenu子菜单内容:subMenuContent搜索:search搜索关键字:keyword搜索范围:range标签文字:tagTitle标签内容:tagContent当前标签:tagCurrent/currentTag标 题:title内容:content列表:list当前位置:currentPath侧边栏:sidebar图标:icon注释: 阅读全文

posted @ 2010-08-07 15:07 slnt 阅读(192) 评论(0) 推荐(0) 编辑

导航