2013年3月12日

C# 线程、timer例句

摘要: Thread thread = new Thread(new ThreadStart(delegate() { oledbConn.Open(); foreach (DataRow x in yxdms) { toCut(x["yxdm"].ToString().Trim()); } oledbConn.Close(); })); ... 阅读全文

posted @ 2013-03-12 15:04 ayao 阅读(215) 评论(0) 推荐(0) 编辑

2013年3月5日

c# delegate应用一例,类似于javascript中直接写的回调函数

摘要: c# delegate应用一例,类似于javascript中直接写的回调函数: //新增和修改操作 list.ForEach(delegate(Object obj) { console.write(obj.toString()); } });//end forEach 阅读全文

posted @ 2013-03-05 17:11 ayao 阅读(196) 评论(0) 推荐(0) 编辑

2012年10月30日

flexigrid js表格控件在IE7下内容显示为空白

摘要: 问题:在测试自己的一段代码时发现IE7下,flexigrid表格内容显示为空白,但是下方的翻页栏中正常显示了记录数。同样的页面在火狐、ie8下显示正常。解决:对比能够政策显示的flexigrid表格发现,页面中的容器标签用div:<div id="tt"></div>,而正常显示的页面用的是table标签。替换为<table id="tt"></table>时,正常显示,问题解决。 阅读全文

posted @ 2012-10-30 13:26 ayao 阅读(546) 评论(0) 推荐(0) 编辑

2012年10月22日

jsTree通过json数据初始化时,如何控制每个选项的图标(icon)显示

摘要: 通过json数据控制jstree的图标(icon)样式,应该如何处理呢?要了解以下几点:1.设置jstree图标(icon)的“总开关”。在配置jstree时,通过“themes”插件的“icon”属性配置是否显示图标,值为true或者false,代码如下。设置为false时不显示图标;为true时,默认显示图标为文件夹图标。 $("#myRightTree") .jstree({ "plugins" : [ "themes","json_data" ], ... 阅读全文

posted @ 2012-10-22 20:43 ayao 阅读(12495) 评论(1) 推荐(1) 编辑

2012年8月31日

c#遍历枚举中的项

摘要: Type type = typeof(enumTest); foreach (FieldInfo x in type.GetFields(BindingFlags.Public | BindingFlags.Static)) { enumTest item = (enumTest)x.GetValue(null); }思路:遍历枚举的公共且静态的Field,获取Field的值;然后将值强制转为枚举类型。 阅读全文

posted @ 2012-08-31 09:49 ayao 阅读(830) 评论(0) 推荐(0) 编辑

2012年6月25日

一个用jQuery写的函数,用于实现JSON.stringify

摘要: function jsonToStr(json) { var s = ""; $.each(json,function(i,n){ s+= "," + i + ":" + n; }); if(s != "") { s = s.substring(1); } return "{" + s + "}"; }JSO... 阅读全文

posted @ 2012-06-25 17:17 ayao 阅读(5856) 评论(1) 推荐(0) 编辑

2012年3月23日

常用css笔记

摘要: css透明度,多浏览器兼容div.transp { /* make the div translucent */ opacity: 0.6; /* Firefox, Safari(WebKit), Opera) */ filter: "alpha(opacity=60)"; /* IE 8 */ filter: alpha(opacity=60); /* IE 4-7 */ zoom: 1; /* needed in IE up to version 7, or set width or height to trigger "hasLayout" */ 阅读全文

posted @ 2012-03-23 09:29 ayao 阅读(156) 评论(0) 推荐(0) 编辑

2012年3月15日

javascript获取iframe框架中加载的页面document对象

摘要: javascript获取iframe框架中,加载的页面document对象因为浏览器安全限制,对跨域访问的页面,其document对象无法读取、设置属性 function getDocument(iframe) { var Doc; try{ Doc = iframe.contentWindow.document;// For IE5.5 and IE6 } catch(ex){} if(!Doc) { Doc = iframe.contentDocument;// For NS6 } return Doc; } 阅读全文

posted @ 2012-03-15 14:00 ayao 阅读(3376) 评论(0) 推荐(0) 编辑

2012年3月1日

javascript访问json数据简单入门例子

摘要: <html><head> <title>javascript访问json数据简单入门例子</title></head><body> <script type="text/javascript"> var json; window.onload = function() { //初始化字符串格式的json数据 var s = "[{name:'张三',sex:'男'},{name:'李四',sex:'女'}]" 阅读全文

posted @ 2012-03-01 16:49 ayao 阅读(491) 评论(0) 推荐(0) 编辑

导航