2013年6月19日

JS获取上传文件的绝对路径,兼容IE和FF

摘要: <input type="file" id="fileBrowser" name="fileBrowser" size="50" onchange="readFile(this)" /><script type="text/javascript">function readFile(fileBrowser) { if (navigator.userAgent.indexOf("MSIE")!=-1) readFileIE(fileB 阅读全文

posted @ 2013-06-19 16:35 Tadpole 阅读(939) 评论(0) 推荐(0) 编辑

2013年6月16日

Expression<Func<T, bool>>

摘要: public static Expression<Func<T, bool>> True<T>() { return f => true; }public static Expression<Func<T, bool>> False<T>() { return f => false; }/// <summary> /// 条件或 /// </summary> /// <typeparam name="T"></typeparam> /// &l 阅读全文

posted @ 2013-06-16 18:27 Tadpole 阅读(1152) 评论(0) 推荐(0) 编辑

2013年6月9日

Javascript的数组通过ajax传到控制器里面。在。net中接受数组

摘要: Javascript代码:toolbarEvent.onNew = function () { var name = prompt("请输入模板名称:", ""); var items = {}; var indices = []; var selects = $("select[code='drillinginfo']"); for (var i = 0; i < selects.length; i++) { items[i] = new Item(selects[i].id, selects[i].... 阅读全文

posted @ 2013-06-09 22:01 Tadpole 阅读(98) 评论(0) 推荐(0) 编辑

2013年5月30日

JSON

摘要: function arrayToJson(o) { var r = []; if (typeof o == "string") return "\"" + o.replace(/([\'\"\\])/g, "\\$1").replace(/(\n)/g, "\\n").replace(/(\r)/g, "\\r").replace(/(\t)/g, "\\t") + "\""; if (typeof o == &quo 阅读全文

posted @ 2013-05-30 16:49 Tadpole 阅读(138) 评论(0) 推荐(0) 编辑

2013年1月24日

Jquery

摘要: 1、JQuery的核心的一些方法each(callback) '就像循环$("Element").length; ‘元素的个数,是个属性$("Element").size(); ’也是元素的个数,不过带括号是个方法$("Element").get(); ‘某个元素在页面中的集合,以数组的形式存储$("Element").get(index); ’功能和上面的相同,index表示第几个元素,数组的下标$("Element").get().reverse(); ‘把得到的数组方向$(&quo 阅读全文

posted @ 2013-01-24 14:50 Tadpole 阅读(210) 评论(0) 推荐(0) 编辑

导航