paul_cheung

导航

随笔分类 -  Javascript

jquery change dropdownlist selected option
摘要:$("[name='corporation']").val(3); //选中corporation3 阅读全文

posted @ 2014-04-15 18:22 paul_cheung 阅读(240) 评论(0) 推荐(0)

html a tag's href javascript issue
摘要:a标签的href中写js中遇到的问题(ie中有问题,chrome没问题)//假如没有void(0)阻止执行,在ie中会出现本页面跳转,页面内容为[object Object]原因未知;望大神给出简单的解释! 阅读全文

posted @ 2014-04-08 18:07 paul_cheung 阅读(124) 评论(0) 推荐(0)

jquery selector checkbox
摘要:$("#competencyList input:checkbox").on("click", function () { var checkedCompetency = $("#competencyList input:checked") $.each(checkedCompetency, function (index, value) { alert(checkedCompetency[index]... 阅读全文

posted @ 2014-04-08 18:01 paul_cheung 阅读(155) 评论(0) 推荐(0)

jquery remove/add css
摘要:js控制按钮的enable和disable,按钮文字的改变 阅读全文

posted @ 2014-04-08 18:00 paul_cheung 阅读(364) 评论(0) 推荐(0)

javascript generate a guid
摘要:function Guid() { var random = (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); return random; }; function GenerateGUID() { var guid = (Guid() + Guid() + "-" + Guid() + "-" + Guid() + "-" + Guid() + "-" + Guid() + Guid() + Guid... 阅读全文

posted @ 2014-04-08 17:59 paul_cheung 阅读(318) 评论(0) 推荐(0)

ajax请求后根据条件进行页面跳转
摘要:$.ajx({ url: "@Url.Action("DetectCorporationCompetencyCreated", "DataBase")", data: { corporationId: rowId }, async:false, success: function (data) { ... 阅读全文

posted @ 2014-04-08 17:58 paul_cheung 阅读(714) 评论(0) 推荐(0)

jquery validate ajax submit form
摘要:when the jquery validation plugin is used for validating the form data, such as below:html code: 预定版本 免费版本 联系人 ... 阅读全文

posted @ 2014-04-08 15:33 paul_cheung 阅读(1018) 评论(1) 推荐(0)

百度map API
摘要:1.做demo用的http://developer.baidu.com/map/jsdemo.htmdemo代码(外部使用的话需要提供密钥):百度地图的Hello, World2.API DOC:http://developer.baidu.com/map/reference/index.php定位 http://developer.baidu.com/map/jshome.htm定位,街景等API;3.Get key:http://lbsyun.baidu.com/apiconsole/key 阅读全文

posted @ 2013-10-14 11:37 paul_cheung 阅读(294) 评论(0) 推荐(0)

Modular JavaScript[AMD and CommonJS]入门
摘要:原文链接:http://addyosmani.com/writing-modular-js/Modularity当说到一个应用是模块化的,意思是说它是由一系列耦合度很低、有明确功能的模块所组成。松耦合通过尽可能移除依赖(by removing dependencies)使Apps维护起来更方便;这里介绍三种书写模块化javascript的方法:AMD, CommonJS, Harmony(proposals for the next version of javascript);序:实现模块化的基本方法就是使用script loaders(推荐RequireJS和curl.js)。从产品发布的 阅读全文

posted @ 2013-08-02 16:52 paul_cheung 阅读(523) 评论(0) 推荐(0)

Static variables in JavaScript
摘要:javascript中变量和方法,static, public,private 阅读全文

posted @ 2013-07-31 21:03 paul_cheung 阅读(187) 评论(0) 推荐(0)

TypeScript入门笔记
摘要:TypeScript的简单结构,module,AMD简单介绍 阅读全文

posted @ 2013-07-31 19:49 paul_cheung 阅读(619) 评论(0) 推荐(0)

JavaScript私有方法
摘要:some concepts: Java is from Sun Microsystem Inc., andJavaScript, called LiveScript before,is from Netscape; those two languages has little relationship with each other. Just their names confuse us. 个人一直以为javascript中没有私有成员(变量和方法)的说法,直到看完此文云雾骤散。1.对象 Arrays, Functions, Objects都是对象。Objects是name-valu... 阅读全文

posted @ 2013-07-24 16:27 paul_cheung 阅读(345) 评论(0) 推荐(0)

JS判断浏览器类型与版本
摘要:javascript判断浏览器类型 阅读全文

posted @ 2013-07-16 23:53 paul_cheung 阅读(179) 评论(0) 推荐(0)