码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
javascript笔记(2)(Evernote)
  函数声明: function  函数名称  (参数:可选) { 函数体 } 函数表达式: function  函数名称(可选)(参数:可选) { 函数体 }  
分类:编程语言   时间:2016-03-13 17:31:49    阅读次数:169
js学习笔记1(从Evernote迁移)
一、  尽量不要声明全局变量,Javascript中,未定义实用,非var ,均视为全局变量; 如 function foo() { var a = b = 0; // ...} 其中 a是foo的局部变量 b则是全局变量 右到左的赋值 function sum(x, y) { result = x
分类:Web程序   时间:2016-03-13 17:27:31    阅读次数:126
JS之事件(一)
事件:交互 异步监听,不是JS引擎监听的 一、绑定 1.ele.onxxxx(eg:onclick) = function (e) { //回调函数/事件处理函数 } 兼容性很好,但同一个事件仅能绑定一个处理函数 等同在html行间写 this指向本身 2.obj.addEventListener(
分类:Web程序   时间:2016-03-13 14:31:18    阅读次数:225
ttt
require=function e(t,n,r){function o(i,s){if(!n[i]){if(!t[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);va
分类:其他好文   时间:2016-03-13 14:07:27    阅读次数:277
leetcode 242. Valid Anagram
Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = "anagram", t = "nagaram", return true.s = "rat", t =
分类:其他好文   时间:2016-03-13 12:44:43    阅读次数:171
linux下使用gcc/g++编译代码时gets函数有错误
今天在linux中使用个g++编译一个名为myfirst.cpp的代码的时候,出现如下错误 myfirst.cpp: In function ‘int main()’:myfirst.cpp:11:2: warning: ‘char* gets(char*)’ is deprecated (decl
分类:系统相关   时间:2016-03-13 12:40:16    阅读次数:248
js添加var和不加var区别
var 声明的变量,作用域是当前 function 没有声明的变量,直接赋值的话, 会自动创建变量 但作用域是全局的. // function doSth() { a = "AAA"; } doSth(); // 执行一次 doSth alert(a); // 可以看到 "AAA" // 如果用
分类:Web程序   时间:2016-03-13 12:40:01    阅读次数:210
shell 实现统计一个网段的IP和mac对应关系并保存到文件mac.txt
#!/bin/bash #function:CounttherelationshipbetweenipandmacinaCsubnet #createdbycomkatMar.12.2016 quitScript(){ echo"UserInterrupt,Quit..." } trap‘quitScript;exit5‘SIGINT####supportctrl+cinterrupt read-p"请输入你要测试的网段(如192.168.0.0):"string a=`echo$st..
分类:系统相关   时间:2016-03-13 06:38:14    阅读次数:187
Linux Bash-函数
定义: function FUNCNAME{ command }   FUNCNAME(){ command } 自定义函数执行状态返回值: return # 函数传参: $n:函数参数。
分类:系统相关   时间:2016-03-13 06:05:03    阅读次数:171
回复音乐
private function IreplyMusic1($Wechat,$data) { $musicdata_Arr=array(); $musicdata_Arr[]=array( "Title"=>"或许我们应该我趁早!", "Description"=>"到后来才发现爱你是一种习惯 我学
分类:其他好文   时间:2016-03-13 00:30:18    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!