有时候一些项目中会使用类似如下的方式覆盖掉console对象: var console = {}; console.log = function(){}; console.info = function(){}; window.console = console; 这个时候如果需要在控制台调试一些接 ...
分类:
其他好文 时间:
2016-05-19 14:47:44
阅读次数:
215
$("p")
.append($("input").map(function(){
return$(this).val();
})
.get()
.join(","));<form>
<inputtype="text"name="name"value="John">
<inputtype="text"name="password"value="password">
<inputtype="text"name="url"value="http://ejohn.org/"..
分类:
Web程序 时间:
2016-05-19 13:31:46
阅读次数:
303
/**
*CallthegivenClosure/class@methodandinjectitsdependencies.
*
*@paramcallable|string$callback
*@paramarray$parameters
*@paramstring|null$defaultMethod
*@returnmixed
*/
//callthegivenClosurelikeclassmethod
//theninjectitsdependencies.
publicfunctioncall($..
分类:
其他好文 时间:
2016-05-19 13:28:43
阅读次数:
163
1. 创建测试自定义函数(1) CREATE DEFINER=`dbdh`@`localhost` FUNCTION `test`.`sp_function_dbdh_three`() RETURNS varchar(255) CHARSET utf8BEGIN DECLARE l_NEW_STR ...
分类:
数据库 时间:
2016-05-19 13:14:44
阅读次数:
205
1.阻止浏览器的默认行为 function stopDefault(e) { //如果提供了事件对象,则这是一个非IE浏览器 if(e && e.preventDefault) { //阻止默认浏览器动作(W3C) e.preventDefault(); } else { //IE中阻止函数器默认动 ...
分类:
Web程序 时间:
2016-05-19 13:10:22
阅读次数:
286
onDblClickCell: function (rowIndex, field, value) { var rows = $('#dataGrid').datagrid('getRows'); var row = rows[rowIndex]; var id = row.id;} ...
分类:
Windows程序 时间:
2016-05-19 13:09:53
阅读次数:
1772
<html> <head> <script> function submitit1() //交由程序1处理 { document.form1.action = "http://www.baidu.com/" document.form1.submit(); } function submitit2( ...
分类:
Web程序 时间:
2016-05-19 10:46:32
阅读次数:
962
下面提一下jQuery的each方法的几种常用的用法 Js代码 var arr = [ "one", "two", "three", "four"]; $.each(arr, function(){ alert(this); }); //上面这个each输出的结果分别为:one,two,three, ...
分类:
Web程序 时间:
2016-05-19 10:23:38
阅读次数:
141
JS - caller,callee,call,apply 概念[转载] 在提到上述的概念之前,首先想说说javascript中函数的隐含参数:arguments Arguments : 该对象代表正在执行的函数和调用它的函数的参数。 [function.]arguments[n] 参数functi ...
分类:
移动开发 时间:
2016-05-19 10:15:33
阅读次数:
300
ES6的很多特性都跟Generator扯上关系,而且实际用处比较广, 包含了任何需要异步的模块, 比如ajax, filesystem, 或者数组对象遍历等都可以用到; Generator的使用: Generator函数和普通的函数区别有两个, 1:function和函数名之间有一个*号, 2:函数 ...
分类:
编程语言 时间:
2016-05-19 06:42:43
阅读次数:
267