08 2010 档案
【JS】验证是数字字符串
摘要:if (!isNaN(data)) { //返回数字时即为验证通过 用户ID $("#ErrorMsg").html("登录验证成功,正在跳转..."); $.cookie("applicantID", data); $.cookie("applicantName") location.href = "ConsummateInfo.aspx"; } else { $("#ErrorMsg").html(data); } 阅读全文
posted @ 2010-08-25 16:29 Renn.Erann 阅读(392) 评论(0) 推荐(0)
【JS】浏览器全屏方案
摘要:function GetPId(pid) { var ss = "exampart1.aspx?PId="; ss += pid; openModal(ss); } //2010.06.23新加弹窗,可以防止大多数浏览器屏蔽问题 function openModal(url) { popupDialog(url, screen.width, screen.height); } function popupDialog(url, width, height) { var x = parseInt(screen.width / 2.0) - (width / 2.0); var 阅读全文
posted @ 2010-08-06 09:24 Renn.Erann 阅读(1211) 评论(0) 推荐(0)
【C#】本地化两种方案
摘要:起因:AJAX异步通信到*.ashx一般处理程序时,传递中文将出现乱码。解决方案一:在aspx页面中的JS代码中进行编码:var fileName = "测试test";fileName = escape(fileName); //传值编码,中文时有用 在一般程序程序页面(*.ashx) 解码:context.Response.ContentType = "text/plain";//context.Response.Charset = "utf-8";string name = HttpContext.Current.Server. 阅读全文
posted @ 2010-08-05 09:28 Renn.Erann 阅读(879) 评论(0) 推荐(0)