码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
JavaScript高级程序设计(二)
一、函数1.1 JS中函数无重载,同一作用域下定义两个函数,而不会引发错误,但真正调用的是后面定义的函数。例如:function doAdd(iNum){ alert(iNum+100);}function doAdd(iNum){ alert(iNum+10);}doAdd(10);//结果为.....
分类:编程语言   时间:2014-10-21 23:10:52    阅读次数:212
php判断是移动端还是pc
//判断是否是手机function is_mobile(){ $agent = strtolower($_SERVER['HTTP_USER_AGENT']); $is_pc = (strpos($agent, 'windows nt')) ? true : false;...
分类:移动开发   时间:2014-10-21 23:07:20    阅读次数:320
Same Tree 比较两个二叉树是否完全相同
Given two binarytrees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and...
分类:其他好文   时间:2014-10-21 23:02:04    阅读次数:240
javascript技巧篇(3) - 防止重复提交表单
在页面加入如下javascript程序代码: var checkSubmitFlag=false;var checkSubmit(){ function(){ if(checkSubmitFlag==true){ return false; } checkSubmitFlag=true; ret.....
分类:编程语言   时间:2014-10-21 22:55:42    阅读次数:254
LeetCode Two Sum
Two Sum Total Accepted: 37848 Total Submissions: 206006 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return ...
分类:其他好文   时间:2014-10-21 21:44:10    阅读次数:267
《Javascript高级程序设计》读书笔记之bind函数详解
为什么需要bindvar name = "The Window";var object = { name: "My Object", getNameFunc: function () { return function () { return this...
分类:编程语言   时间:2014-10-21 21:24:03    阅读次数:206
OpenCASCADE Root-Finding Algorithm
Abstract. A root-finding algorithm is a numerical method, or algorithm, for finding a value x such that f(x)=0, for a given function f. Such an x is c...
分类:其他好文   时间:2014-10-21 21:14:26    阅读次数:333
每天一个JavaScript实例-动态省份选择城市
每天一个JavaScript实例-动态省份选择城市 var citystore = new Array(); citystore = [['SD','济南'],['SD','烟台'],['SD','青岛'],['SX','太原'],['BJ','北京'],['HN','海南']]; window.onload = function(){ document.getElementById("sta...
分类:编程语言   时间:2014-10-21 19:39:43    阅读次数:272
js 屏蔽 键盘 按键
document.onkeydown=function(){//alert( event.keyCode )//可查看各个按键的keyCode是多少if(event.keyCode == 27)//esc { event.keyCode = 0;returnfalse; }}
分类:Web程序   时间:2014-10-21 19:28:51    阅读次数:153
a标签的href劫持,做判断后在跳转
$.ajax({ type: "POST", url: "/resource/logincheck", data: {id: id}, success: function(data){ ...
分类:Web程序   时间:2014-10-21 19:28:12    阅读次数:1433
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!