checkbox:获取选中的checkbox1,function CheckInput() {var _nCount = 0;$("#box1").find(":checkbox:checked").each(function () {_nCount++;});}2.,if (!$("input[t...
分类:
其他好文 时间:
2015-06-27 16:03:00
阅读次数:
108
Item 21: Use apply to Call Functions with DifferentNumbers of ArgumentsImagine that someone provides us with a function that calculates theaverage of ...
分类:
移动开发 时间:
2015-06-27 16:01:04
阅读次数:
131
1. js模拟休眠方法: function sleep(d){ for(var t = Date.now();Date.now() - t 是项目列表,是列表项,项目列表就是用符号来列的,所以你列出来默认的就是黑点啦,还有一个是这个是编号列表,用数字来列的,也是用做 列表项(ab)。3....
分类:
其他好文 时间:
2015-06-27 15:49:23
阅读次数:
112
项目中在提交Ajax请求时,后台处理数据时间有点长,需要一个遮罩,就随便找了一个实现一下:包含两种方式,个人比较喜欢第二种第一种:$("#saveMaterial").click(function(){ $.messager.progress({ ...
分类:
其他好文 时间:
2015-06-27 15:49:16
阅读次数:
187
getaddress(); function getaddress(type=0,parent='') { var tid=1; $.ajax({ type: "post", url: 'cityajax.php',...
分类:
Web程序 时间:
2015-06-27 11:32:04
阅读次数:
137
原文:JS 获取 本周、本月、本季度、本年、上月、上周、上季度、去年工具类定义: /** * 日期范围工具类 */ var dateRangeUtil = (function () { /*** * 获得当前时间 */ this.getCurrentDate = function () { retu...
分类:
Web程序 时间:
2015-06-27 11:28:10
阅读次数:
109
php调用empty时,出现“Can't use function return value in write context”错误。 源代码如下: if(empty(session("username"))) $this->redirect("Manager/login...
分类:
Web程序 时间:
2015-06-27 11:17:12
阅读次数:
134
/* HTML5 SessionStorage */
//添加数据
function SSsetVal(key, val){
if(window.sessionStorage){
//检测用户是否输入键
if(key=='' || val==''){
return 0;
}
sessionStorage.setItem(key,val);
alert('数据:'+ke...
分类:
Web程序 时间:
2015-06-27 09:56:45
阅读次数:
206
JS:
/**
* 显示提示框
* @param {Object} id
*/
function showModel(content){
$(".md-content").html(content) ;
$("#modalCustom").addClass("md-show");
t = setTimeout('hideModel("modalCustom")', 3000);
}...
分类:
移动开发 时间:
2015-06-27 09:56:42
阅读次数:
171
/**
* 提示启用通知功能
*/
function allowNotice() {
if (window.webkitNotifications) {
window.webkitNotifications.requestPermission();
}else{
alert('放弃');
}
}
/**
* 桌面通知
* @param {Object} imgURL
* ...
分类:
其他好文 时间:
2015-06-27 09:55:38
阅读次数:
113