码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
JS获取字符串长度,一个中文算两个字符。
//第一种GetLength=function(str){varrealLength=0;for(vari=0;i=0&&charCode<=128)realLength+=1;elserealLength+=2;}returnrealLength;}//第二种(采取将255意外的字符替换成"aa"...
分类:Web程序   时间:2015-06-17 13:17:03    阅读次数:219
对Arguments's的理解
1、Arguments是一个类似数组的实参队列,译文论据,论点,姑且译作参数(实参);2、Arguments与形参保持不同的存储空间,只有当形参被赋值之后才会3、传说在严格模式下函数内自调,arguments.callee失效了function TomG(a,b,c) { console.log(....
分类:其他好文   时间:2015-06-17 13:16:14    阅读次数:110
javascript的new运算的思考
看到一篇关于javascript单例的文章http://blog.crazycoder.cc/post/13对javascript new运算有些思考:情况1:function test1(){ return {name:'test1'};};new test1的结果:{name:'test1'}....
分类:编程语言   时间:2015-06-17 11:17:33    阅读次数:110
js获取上一个月、下一个月
/** * 获取上一个月 * * @date 格式为yyyy-mm-dd的日期,如:2014-01-25 */ function getPreMonth(date) { var arr = dat...
分类:Web程序   时间:2015-06-17 11:09:06    阅读次数:210
JavaScript随笔之——函数用法
1、reduce函数用法: $(function(){ // arrowMouseOver(); Array.prototype.reduce=null; //将内置reduce函数设置为null var eleResult=document.getElementById("re...
分类:编程语言   时间:2015-06-17 11:07:06    阅读次数:153
jshint warning翻译
globalMsg = {“Missing semicolon.” : “缺少分号.”,“Use the function form of \”use strict\”.” : “使用标准化定义function.”,“Unexpected space after ‘-’.” : “在’-'后面不应出...
分类:Web程序   时间:2015-06-17 11:00:36    阅读次数:235
创建简单的jquery插件
MyHtml.html a{display: block;width: 20;height: 20;ba} (function($){ $.fn.greenify = function(options){ var settings = $.extend( {color:"green", backgrou...
分类:Web程序   时间:2015-06-17 09:40:56    阅读次数:171
php oci8 小试
Oracle_db.class.phplink=$this->connect(); if(!$this->link){ echo "连接失败"; exit; } } public function connect(){ return oci_connect('demo','demo',...
分类:Web程序   时间:2015-06-17 08:15:08    阅读次数:152
简单的类php和mysql
host = $host; $this->name = $name; $this->pass = $pass; $this->table = $table; $this->ut = $ut; $this->connect(); } //建立连接数据库的函数 function...
分类:数据库   时间:2015-06-17 00:23:02    阅读次数:169
[C/CPP系列知识] C++中extern “C” name mangling -- Name Mangling and extern “C” in C++
http://www.geeksforgeeks.org/extern-c-in-c/C++函数重载(function overloading),但是C++编译器是如何区分不同的函数的呢?----是通过在函数名是加些信息来区不同的函数,即所谓的Name Mangling。C++标准并没有对name ...
分类:编程语言   时间:2015-06-16 22:55:45    阅读次数:204
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!