This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div onclick="test('hello')">Click me!</div> | |
<script type="text/javascript" language="javascript"> | |
function test(arg,arg2) { | |
var _e=window.event||arguments.callee.caller.arguments[0]; | |
alert("arguments.callee:\n"+arguments.callee+"\n"); | |
alert("arguments.callee.arguments[0]:\n"+arguments.callee.arguments[0]+"\n"); | |
alert("arguments.callee.caller:\n"+arguments.callee.caller+"\n"); | |
alert("arguments.callee.caller.arguments[0]:\n"+arguments.callee.caller.arguments[0]+"\n"); | |
alert("_e:\n"+_e+"\n"); | |
alert("_e.type:\n"+_e.type+"\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getStyle(elem, name){ | |
//如果属性存在于style[]中,直接取 | |
if(elem.style[name]){ | |
return elem.style[name]; | |
} | |
//否则 尝试IE的方法 | |
else if(elem.currentStyle){ | |
return elem.currentStyle[name]; | |
} | |
//尝试W3C的方式 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//获取光标相对于整个页面的当前位置(兼容各浏览器) | |
//获取光标的水平位置 | |
function getX(e){ | |
e = e || window.event; | |
//先检查非IE浏览器,在检查IE的位置 | |
return e.pageX || e.clentX + document.body.scrollLeft; | |
} | |
//获取光标的垂直位置 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#mark").animate({marginTop:marginTop "px"},200,function(){ | |
$("#mark").animate({marginTop:marginTop-20 "px"},100,function(){ | |
$("#mark").animate({marginTop:marginTop "px"},100); | |
}); | |
});}else{ | |
$("#mark").animate({marginTop:marginTop "px"},200,function(){ | |
$("#mark").animate({marginTop:marginTop 20 "px"},100,function(){ | |
$("#mark").animate({marginTop:marginTop "px"},100); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>jquery实现无刷新分页</title> | |
<style type="text/css"> | |
body{ | |
font-family: "微软雅黑"; | |
font-size: 13px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> | |
<%String basePath = (Request.Url.Scheme + "://" + Request.Url.Authority + Request.ApplicationPath); | |
%> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" > | |
<head> | |
<base href="<%=basePath %>" /> | |
<title>CuttingPic</title> | |
<script type='text/javascript' src='Content/Scripts/Component/loadJsCss.js'></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LogProxy implements InvocationHandler { | |
private Object object; | |
public LogProxy(Object object) { | |
super(); | |
this.object = object; | |
} | |
@Override | |
public Object invoke(Object proxy, Method method, Object[] args) | |
throws Throwable { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static long curModifiedTime; | |
static { | |
try { | |
curModifiedTime = new File(filePath).lastModified(); | |
System.out.println("当前文件修改时间为 " +curModifiedTime); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function trim(s) { | |
return s.replace(/^\s*/, "").replace(/\s*$/, ""); | |
} | |
/* | |
* 限制字数,第一个传要限制的className,第二个传限制的字数 | |
* @author: wxl | |
**/ | |
function limitTextNum(className, num) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$box.animate({ | |
width: this.mWidth "px", | |
height: this.mHeight "px", | |
"left": browserWidth / 2 - this.mWidth / 2 "px", | |
"top": browserHeight / 2 - this.mHeight / 2 "px" | |
}, 300); |