码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
原生js与jq的差异
这里简单记录一下jq封装了原生js的哪些方法,和哪些方法没有封装。鼠标滚轮,这个没有封装FF还是用DOMMouseScroll,ie和chrome用mousewheel// $("#div1").on('mousewheel',function (ev) {// alert(ev...
分类:Web程序   时间:2015-06-24 16:08:44    阅读次数:168
easy ui中datebox格式化时间(全局实现方式)
$.fn.datebox.defaults.formatter = function (date) { var y = date.getFullYear(); var m = date.getMonth() + 1; var d = date.getDate(); return y + '/' +....
分类:其他好文   时间:2015-06-24 16:05:00    阅读次数:174
js 对象数组根据对象中的属性排序
function createComparisonFunction(propertyName){ return function(object1,object2){ var value1 = object1[p...
分类:编程语言   时间:2015-06-24 15:50:33    阅读次数:145
JavaScript面向对象精要(二)
构造函数和原型对象构造函数也是函数,用new创建对象时调用的函数,与普通函数的一个区别是,其首字母应该大写。但如果将构造函数当作普通函数调用(缺少new关键字),则应该注意this指向的问题。var name = "Pomy"; function Per(){ console.log("Hello "+this.name); } var per1 = new Per(); //"Hello...
分类:编程语言   时间:2015-06-24 14:42:58    阅读次数:145
Function 1 - hello world
Function 1 - hello worldMake a simple function calledgreetthat returns the most-famous "hello world!".Although this has been thought as a simple exerc...
分类:其他好文   时间:2015-06-24 14:36:42    阅读次数:86
Counting sheep...
Counting sheep...Description:Consider an array of sheep where some sheep may be missing from their place. We need a function that counts the number of...
分类:其他好文   时间:2015-06-24 14:32:55    阅读次数:131
MVC中前台所得
前台页面时间格式修改:@item.CreateTime.ToString("yyyy-MM-dd hh:mm:ss")前台方法调用传参数:编辑前台异步调controller中方法: var saveData = function () { var postData = { ...
分类:Web程序   时间:2015-06-24 14:30:23    阅读次数:117
JavaScript 给表格排序
(function(){ var mTable=document.getElementById('table'); var sort=function(el,index,desc){ var mTbody=el.tBodies[0], mRow=mTbody....
分类:编程语言   时间:2015-06-24 14:28:30    阅读次数:156
validate.plugin.js 验证插件
/*编写时间:2015-6-4*/(function ($) { $.fn.isValidate = function (obj) { if ($(this).val()!="") { var txt = $(this).val(); //表单元素:i...
分类:Web程序   时间:2015-06-24 14:25:54    阅读次数:141
js验证表单大全
用途:校验ip地址的格式 输入:strIP:ip地址 返回:如果通过验证返回true,否则返回false; */ function?isIP(strIP)?{ if?(isNull(strIP))?return?false; var?re=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/g?//匹配...
分类:Web程序   时间:2015-06-24 13:09:12    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!