摘要: 备忘:function isDecimal(item) { var obj = $(item); if (obj.length > 0) { if ($(obj).val() != null && typeof ($(obj).val()) != "undefined") { var str = $(obj).val().toString(); if (str != "") { var pattern = '^-?[1-9]\\d*$|^-?0\\.\\d*$|^-?[1-9]\\d*\\.\\... 阅读全文
posted @ 2014-03-28 17:40 xachary 阅读(4515) 评论(0) 推荐(0) 编辑
摘要: var defaultBtnId;function setDefaultButton(id) { defaultBtnId = id;}document.onkeydown = function (e) { var theEvent = window.event || e; var code = theEvent.keyCode || theEvent.which; if (code == 13) { if (typeof (defaultBtnId) != "undefined" && defaultBtnId != null) { ... 阅读全文
posted @ 2014-03-28 17:34 xachary 阅读(771) 评论(0) 推荐(0) 编辑
摘要: 把页面表单状态记录到HiddenField中.这里只提供后台代码, 前台逻辑根据需求自由定义.存放值的ViewState:protected Dictionary HiddenFieldForOriginal { get { var data = ViewState["HiddenFieldForOriginal"]; if (data == null) { Dictionary ndata = new Dic... 阅读全文
posted @ 2014-03-28 17:22 xachary 阅读(269) 评论(0) 推荐(0) 编辑
摘要: function CallValidate(group) { if (typeof (Page_ClientValidate) == "function") { Page_BlockSubmit = false; if (Page_ClientValidate(group)) { return true; } else { var results = ""; var ids = ""; var validators = $(Page_Validators); ... 阅读全文
posted @ 2014-03-28 17:13 xachary 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 备忘: 就是如果知道一个字段的名字, 但是忘了它在哪个表里面, 可以方便找一找.SELECT nameFROM sys.tablesWHERE object_id in ( SELECT object_id --字段名 FROM sys.all_columns WHERE name LIKE '%Cheque%') 阅读全文
posted @ 2014-03-28 17:03 xachary 阅读(558) 评论(0) 推荐(0) 编辑