码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
JavaScript中Trim,TrimStart,TrimEnd的实现
//去除字符串头尾空格或指定字符String.prototype.Trim= function(c){ if(c==null||c=="") { var str= this.replace(/^/s*/, ''); var rg = //s/; var i = str.length; while ( ...
分类:编程语言   时间:2016-05-23 10:23:40    阅读次数:231
[Effective JavaScript 笔记] 第14条:当心命名函数表达式笨拙的作用域
js函数会根据上下文改变其含义。 function double(x){return x*2;} 这是一个函数声明,也可以是一个命名函数表达式(named function expression),取决于它出现的地方。 声明一个函数,并绑定一个当前作用域的变量。 同一段函数代码也可以作为一个表达式。 ...
分类:编程语言   时间:2016-05-23 10:18:18    阅读次数:122
返回每月最后一天
ate.prototype.Format = function (fmt) { //author: meizz var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "h+": this.getHours(), //小 ...
分类:其他好文   时间:2016-05-23 09:02:45    阅读次数:125
使用JS换class
1, function ntabs(thisObj,Num) {if(thisObj.className == "active")return; var tabObj = thisObj.parentNode.id; var tabList = document.getElementById(tab ...
分类:Web程序   时间:2016-05-23 09:02:20    阅读次数:154
smarty引入流程
1. 控制器IndexAction.class.php function index() $this -> display(); (父类Action的display) 2. 父类ThinkPHP/Lib/Core/Action.class.php function display() $this->... ...
分类:其他好文   时间:2016-05-23 06:44:10    阅读次数:153
ESL python调用C模块时传递unicode字符串报错问题解决
在是用freeswitch时利用ESL的python调用时传递字符串报错 修改文件esl_wrap.cpp ##### /* for C or C++ function pointers *///添加定义#define SWIG_InternalNewPointerObj(ptr, type, fl ...
分类:编程语言   时间:2016-05-23 06:42:49    阅读次数:455
在jQueryEasyui datagrid加载完成后清除选中
1.jQueryEasyui1.26存在reload后,还会选中的BUG,可以在初始化dataGrid的时候,在Success方法里加上这句onLoadSuccess:function(data){$("#user_msgList").datagrid("clearSelections");},
分类:Web程序   时间:2016-05-23 01:19:17    阅读次数:390
MySQL - undefined function mysql_connect()
1.1.1现象连接MYSQL数据库出错,错误信息如下:Fatalerror:Calltoundefinedfunctionmysql_connect()inE:\Rainman\NetDisk\CurrentWork\wwwroot\phpinfo.phponline31.1.2原因应该是没有找到MySQL的驱动。1.1.3解决方法如下:1、检查php.ini中的extension=php_mysql.dll有没有去..
分类:数据库   时间:2016-05-23 01:18:20    阅读次数:196
exif获取图片旋转角度
downloadurl:https://github.com/exif-js/exif-js//获取照片方向角属性,用户旋转控制 EXIF.getData(file,function(){//fileinput[type=file]的文件 EXIF.getAllTags(this); varorientation=EXIF.getTag(this,‘Orientation‘); console.log(orientation); });
分类:其他好文   时间:2016-05-23 01:13:29    阅读次数:782
点击按钮切换内容效果(使用CSS DIV与JavaScript)
<head><script type="text/javascript">function change_div(id){ if (id == 'gsywly' ) { document.getElementById("gsgs").style.display = 'none' ; document ...
分类:编程语言   时间:2016-05-23 00:30:04    阅读次数:542
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!