摘要:今天做一个MVC3.0的POST提交测试,发现在[AcceptVerbs(HttpVerbs.Post)][ValidateInput(false)]public ActionResult Synchronous(){ string RequestMsg = Request.Form.ToString(); return Content("success");}这样一个ActionResult 前面加上了 [ValidateInput(false)] 还是会出现 --从客户端(="...")中检测到有潜在危险的 Request.Form 值。-- 这样的
阅读全文
摘要:function showCurrentInIfaremPosition() { var isIE = false; if (window.ActiveXObject) { isIE = true; } var isIE9 = false; var browser = navigator.appName var b_version = navigator.appVersion ...
阅读全文
摘要://此方法对于嵌套在一个页面A中的B页面,获取B页面的位置在IE9和其他浏览器(包括IE其他系列浏览器)下有些不同,IE9是根据浏览器来定位的,FF及其他则是根据当前页面也就是嵌套的页面来定位的(真正兼容还待改进) function getEvent() //同时兼容ie和ff的写法 { if (document.all) return window.event; func = getEvent.caller; while (func != null) { ...
阅读全文
摘要:background-color:transparent;filter:alpha(opacity=5);opacity: 0.1;
阅读全文
摘要:/// <summary> /// 根据IP获取省市 /// </summary> public void GetAddressByIp() { string ip = "115.193.217.249"; string PostUrl = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?ip=" + ip; string res = GetDataByPost(PostUrl);//该条请求返回的数据...
阅读全文
摘要:当测试人员检测文本框中连续输入非数字时,我以前写的只能输入数字的javascript就没有用了,对于我先前写的方法,只是针对我只输入一个非数字时.如果一直按键盘不放开一直往里写非数字那就出现错误了.后来试了各种方法. 我想说的是一种我认为很好的方法: <input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"> 很不错input高级限制级用法.取消按
阅读全文