摘要:
备忘: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*\\.\\... 阅读全文
摘要:
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) { ... 阅读全文
摘要:
把页面表单状态记录到HiddenField中.这里只提供后台代码, 前台逻辑根据需求自由定义.存放值的ViewState:protected Dictionary HiddenFieldForOriginal { get { var data = ViewState["HiddenFieldForOriginal"]; if (data == null) { Dictionary ndata = new Dic... 阅读全文
摘要:
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); ... 阅读全文
摘要:
备忘: 就是如果知道一个字段的名字, 但是忘了它在哪个表里面, 可以方便找一找.SELECT nameFROM sys.tablesWHERE object_id in ( SELECT object_id --字段名 FROM sys.all_columns WHERE name LIKE '%Cheque%') 阅读全文