摘要:
1.在for...Loops中使用hasOwnProperty()方法JavaScript数组是没有关联的,可以把它当做哈希表,使用循环来遍历对象属性:for(varpropinsomeObject){ alert(someObject[prop]);//alert'svalueofproperty... 阅读全文
摘要:
1.(兼容)Js获取鼠标位置的坐标View Code 1 function mouseMove(ev) 2 { 3 ev= ev || window.event; 4 var mousePos = mouseCoords(ev); 5 //alert(ev.pageX); 6 document.getElementById("xxx").value = mousePos.x; 7 document.getElementById("yyy").value = mousePos.y; 8 } 9 function mouseCoords(ev) 10 { 1 阅读全文
摘要:
keycode 8 = BackSpace BackSpacekeycode 9 = Tab Tabkeycode 12 = Clearkeycode 13 = Enterkeycode 16 = Shift_Lkeycode 17 = Control_Lkeycode 18 = Alt_Lkeycode 19 = Pausekeycode 20 = Caps_Lockkeycode 27 = Escape Escapekeycode 32 = space spacekeycode 33 = Priorkeycode 34 = Nextkeycode 35 = Endkeycode 36 = 阅读全文
摘要:
1、增加、删除列alter table Movies add ExAttr1 varchar(8) NULL;alter table Movies drop column ExAttr1; 阅读全文
摘要:
1.全角空格(并不等同于两个 ,特别是希望两个中文文字的空格时): 2.元:¥ 阅读全文
摘要:
一、下载Memercached For Windows 二、安装步骤 1、解压到指定目录,如:C:\Memcached\memcached-win32-1.4.4-14(在本机[64位操作系统]装过win64-1.4.4版本,安装成功,也能看到命令和状态,但无法存取,32位的没问题,可能和自己引用的 阅读全文
摘要:
1.jQuery.validate验证:<inputtype="file"id="avatar"name="avatar"class="{validate:{required:true,accept:true}}"/> accept接受的是:image(png,jpg,jpeg,gif) <inputtype="file"id="cv"name="cv"class="{validate:{required:true,accept 阅读全文
摘要:
1.枚举2.获取枚举描述/// /// 获取对象描述信息/// /// /// public static string GetDescription(this object input){ if (input == null) return string.Empty; Type enumType = input.GetType(); if (!enumType.IsEnum) { return string.Empty;}var name = Enum.GetName(enumType, Convert.ToInt32(input)); if (name == null... 阅读全文
摘要:
1.ModelState.AddModelError("ServerMessage", MessageHelper.Instance.GetMessage(code));@Html.ValidationMessage("ServerMessage")2.private Field<DateTime?> _ExpiredDate = new Field<DateTime?>();如果是底层返回的数据,则应该判断_ExpiredDate == null如果你是new, 则判断_ExpiredDate.value == null此类型前 阅读全文
摘要:
1.分页查询select * from (select rownum no, e.* from (select * from emp order by sal desc) e where rownum<=5 ) where no>=3select * from (select rownum no,e.* from (select * from emp order by sal desc) e) where no>=3 and no<=52.存储过程a.范例一create or replace procedure bp_sp_product_insert( v_produ 阅读全文