码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
[整理]javascript压缩、格式化
1.使用packer来压缩JS文件packer工具在线版:http://dean.edwards.name/packer/通过packer对js打包压缩的同时,执行Base62 encode编码后,代码变得难以阅读。如:eval(function(p,a,c,k,e,r){e=String;if(!...
分类:编程语言   时间:2014-06-06 22:52:40    阅读次数:337
JS中的作用域和闭包
作用域:在编程语言中,作用域控制着变量与参数的可见性及生命周期。JS确实有函数作用域,那意味着定义在函数中的参数和变量在函数外部是不可见的,而且在一个函数中的任何位置定义的变量在该函数中的任何地方都是可见的。var a = 1;var fs = function (){ var b = 2; ...
分类:Web程序   时间:2014-06-04 17:18:36    阅读次数:224
Function 语意学
C++支持三种类型的member functions: static、nonstatic和virtual,每一种类型调用方式都不相同。一 nostatic members functions1 调用方式 C++的设计原则之一就是:nonstatic member function知识和一般的non....
分类:其他好文   时间:2014-06-04 17:08:52    阅读次数:328
html页面加载初始化方法
js:方法一:window.onload=function(){内容}方法二(自己定义方法):function onload(){内容} onload();jQuery:方法一:$(document).ready(function(){内容});方法二:$(function(){内容});方法三:j...
分类:Web程序   时间:2014-06-04 17:04:51    阅读次数:781
PHP curl get post通用类
url = $url; $this->ch = curl_init(); $this->type = $type; } //设置发送方式 0 get 1 post public function setType( ...
分类:Web程序   时间:2014-06-04 16:16:05    阅读次数:201
4.2 THE COMPLETENESS THEOREM: (5) The right-hand sides depend only on the $\mathbf{a_i^{\circ}}$ and not on the $\mathbf{a_i}$
The right-hand sides of n-ary function and predicate definition in canonical structure depend only on the $\mathbf{a_i^{\circ}}$ and not on the $\math...
分类:其他好文   时间:2014-06-04 15:49:48    阅读次数:179
JQuery日记 6.3 JQuery遍历模块
jQuery.extend({ // 返回elem延DOM树某个方向访问的所有节点,直到遇到until条件 dir: function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( (elem = elem[ dir ]) && elem.nodeType !== ...
分类:Web程序   时间:2014-06-04 14:08:53    阅读次数:374
PHP 根据IP地址获取所在城市
有这样的需求,需要根据用户的IP地址,定位用户所在的城市。 本文记录性文章,无逻辑性。有这样需求的朋友,可以直接拷贝使用。直接上代码,不需赘述。 <?php header('Content-Type:text/html;Charset=utf-8'); function GetIp(){ $realip = ''; $unknown = 'unknown'; if (i...
分类:Web程序   时间:2014-06-04 13:41:02    阅读次数:441
Js监听键盘事件
表单提交的时候大多数用户都习惯用回车键来进行提交,页面接受回车键的处理如下:if(navigator.userAgent.indexOf("MSIE")>0) { //IE document.onkeydown=function(){ if(1...
分类:Web程序   时间:2014-06-03 16:37:27    阅读次数:538
监听键盘的enter键
$(document).keypress(function(e) { switch(e.which) { case 13: if(g_flag == "login"){validateLoginForm();} else if(g_flag == "registe...
分类:其他好文   时间:2014-06-03 15:32:37    阅读次数:310
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!