`
JavaSam
  • 浏览: 951668 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
当判断一个对象是否是Arguments对象时,我们会这么写 Object.toString.call(arguments) == "[object Arguments]"; 谨记千万不要这样写,因为它在ie8以下是"[object Object]" ----- 跟其他object对象没有区别。
function afterPaste() { var clipData = clipboardData; var text = clipData.getData('text'); //剪贴板数据 var reg = /\s/g; var ntxt = text.replace(reg, ""); var that = this; //this.value = ntxt; 这种方式不行 必须setTimeout() setTimeout(function() { document. ...
var docCookies = { getItem: function (sKey) { return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null; }, setIt ...
/** *storage 对象 */ function storage (){ var args = [].slice.call(arguments); this.storeName = location.hostname||"defaultData"; this.store = {}; this.inited = false; } storage.prototype={ init:function (){ var doc = document; var _storeEle = doc.createElement(" ...
/** * @author wsf 数据分组,排序js */ ; (function(win, $) { var _jsUtils = null; if(jsUtils) _jsUtils = new jsUtils();//js工具对象 //分组排序对象 function groupSorter() { //数据 this.data = null; //排序方式 this.sortType = [ 'asc', 'desc' ]; //默认排序方法 this.defaultsortType = this.sortT ...

EhCache简单例子

    博客分类:
  • JAVA
import net.sf.ehcache.Cache; import net.sf.ehcache.CacheException; import net.sf.ehcache.CacheManager; import net.sf.ehcache.Element; public class EhCacheUtil { public static CacheManager cacheManager; private String cacheName; int maxElementsInMemory = 1000; static { if (cacheManag ...
var d1 = new Date('2013-01-01'); var d2 = new Date('2014-09-01');            alert((d2-d1)/1000/60/60/24);     请不要写一大堆代码。
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; import java.util.Properties; @SuppressWarnings("rawtypes") public class IniReader { protected HashMap sections = new HashMap(); private transient String currentSecion ...
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import net.sf.json.JSONObject; import org.apache.poi.xssf.usermod ...
import java.io.IOException; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient. ...
package com.citics.crm.customerwidget.utils; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.List; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermode ...
web版2048小游戏 --- 学习用
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GB2312" /> <script language="JavaScript"> < !-- // 汉字拼音首字母列表 本列表包含了20902个汉字,用于配合 ToChineseSpell //函数使用,本表收录的字符的Unicode编码范围为19968至40869, XDesigner 整理 ...
/** * 转换为Tree结构 * @param treedata * @return */ public static Tree toTreeList(List<Tree> treedata){ Tree root = null; for(Tree node:treedata){ String parentid = node.getParentid(); if(parentid.equals("0")) root = node; Tree parent = getTarge ...
/** * @author wsf html转换工具 */ var filePath = "d:"; function exportHtml() { if (filePath != null) { var file; try { var fso = new ActiveXObject("Scripting.FileSystemObject"); file = fso.createtextfile(filePath + "/测试导 ...
Global site tag (gtag.js) - Google Analytics