摘要: SQL split 分割字符串ALTER FUNCTION [dbo].[fSplit](@strSplitString varchar(8000), --待分拆的字符串@strSplitUnit varchar(10) --数据分隔符)RETURNS @result TABLE(col varchar(8000))ASBEGIN DECLARE @splitlen int SET @splitlen=LEN(@strSplitUnit)-1 WHILE CHARINDEX(@strSplitUnit,@strSplitString)>0 BEGIN INSERT ... 阅读全文
posted @ 2012-07-06 11:01 wongley 阅读(511) 评论(0) 推荐(0) 编辑
摘要: js 弹出DIV层function Pop_Msg(id) { var msgw, msgh, bordercolor; var str = document.getElementById(id); str.style.display = "block"; var sWidth, sHeight; var w = str.offsetWidth; var h = str.offsetHeight; sWidth = document.body.offsetWidth; sHeight = document.body.offsetHeight + ... 阅读全文
posted @ 2012-07-06 10:55 wongley 阅读(770) 评论(0) 推荐(0) 编辑
摘要: JS 弹出页面//弹出页面function Pop_Layer(url, w, h) { var msgw, msgh, bordercolor; var str = '<iframe src=' + url + ' width=' + w + ' marginwidth=0 height=' + h + ' marginheight=0 scrolling=no frameborder=0 id=rightframe01 name=rightframe01 ></iframe>' var sWidth, 阅读全文
posted @ 2012-07-06 10:52 wongley 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 检验邮箱格式//检邮箱格式function isEmail(v) { if (/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/g.test(v)) { return true; } else { return false; }} 阅读全文
posted @ 2012-07-06 10:47 wongley 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 手机格式//手机格式function isPhone(v) { if (/^1[3|4|5|6|7|8][0-9]\d{4,8}$/g.test(v)) { return true; } else { return false; }} 阅读全文
posted @ 2012-07-06 10:43 wongley 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Js读取Cookies//Js读取Cookiesfunction getCookie(name, key) { var nameValue = ""; var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)) { nameValue = decodeURI(arr[2]); } if (key != null && key != "") { reg = new 阅读全文
posted @ 2012-07-06 10:41 wongley 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 读取xls\xlsx格式的Excel ///<summary> ///读取xls\xlsx格式的Excel文件的方法 ///</ummary> ///<param name="path">待读取Excel的全路径</param> ///<returns></returns> private DataTable ReadExcelToTable(string path) { //连接字符串 string connstring = "Provider=M... 阅读全文
posted @ 2012-07-06 10:38 wongley 阅读(714) 评论(0) 推荐(0) 编辑