摘要: <input onkeyup="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d+(\.\d{0,2})?/)[0] : ''" type="text" /> 阅读全文
posted @ 2019-03-28 17:16 常威打来福 阅读(510) 评论(0) 推荐(0) 编辑
摘要: View视图 @{html.renderaction("控制器方法名","控制器名称",new{params1="参数值"})} Controllers 控制器: public ActionResult GetList(object params1,...){return PartialView(" 阅读全文
posted @ 2018-03-29 16:36 常威打来福 阅读(422) 评论(0) 推荐(0) 编辑
摘要: function CheckTxtLength(txt) { var num = txt.replace(/[^\x00-\xff]/g, 'xx').length; if (num <=11) { return true; } return false; } 注:11代表最大长度 num代表 该文 阅读全文
posted @ 2016-09-22 16:02 常威打来福 阅读(5316) 评论(0) 推荐(0) 编辑
摘要: public class HttpHelper {/// <summary> /// Get请求 /// </summary> /// <param name="url">接口地址例如:http://www.jiekou.com?id=123&name=jack</param> /// <retur 阅读全文
posted @ 2016-08-25 17:34 常威打来福 阅读(594) 评论(0) 推荐(0) 编辑
摘要: //int 数组转string数组 int [] test={1,2,3,4}; string result=test.Select(i => i.ToString()).ToArray(); //int 数组转 string中间用逗号隔开 int [] test={1,2,3,4}; string 阅读全文
posted @ 2016-07-29 11:00 常威打来福 阅读(1753) 评论(1) 推荐(0) 编辑
摘要: //将奖励转换成json格式 _page.StrRewardToJson = function () { var hdReward = $("#hdReward").find("option:selected").text(); var ltReward = $("#ltReward").find( 阅读全文
posted @ 2016-06-25 16:07 常威打来福 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 如果要我们要把整个form1表单中的输入框都传过去可以用data:$("#form1").serialize(), 但是我们如果还要传一个不在form中的值呢? 可以使用下面这种方法: var n=$("#form1").serialize();n+="&obj="+obj; data:n, 就可以 阅读全文
posted @ 2016-06-25 11:14 常威打来福 阅读(303) 评论(0) 推荐(0) 编辑
摘要: public string RadomNumArray() { Random r = new Random(); int a = 0; int[] num = new int[6]; string text = ""; for (int i = 0; i < 6; i++) {//循环生成6个数字 阅读全文
posted @ 2016-05-28 11:07 常威打来福 阅读(1557) 评论(0) 推荐(0) 编辑
摘要: 那性能问题到底该如何解决?以下是应用系统发布前,作为 .NET 开发人员需要检查的点。 1.debug=「false」 当创建 ASP.NET Web应用程序,默认设置为「true」。开发过程中,设置为「true」是非常有用多,但在应用程序发布部署时,需将其设置为「false」。 <compilat 阅读全文
posted @ 2016-01-31 09:34 常威打来福 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1 /// <summary> 2 /// 遍历页面textbox 3 /// </summary> 4 private float ForText(string s) {//System.Web.UI.WebControls.TextBox tbxTableMathScore = (System. 阅读全文
posted @ 2015-12-09 17:30 常威打来福 阅读(560) 评论(0) 推荐(0) 编辑