http://bird.ruosen.io/deprecated
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 getAbsoluteUrl(url) { | |
var a = document.createElement('a'); | |
a.href = url; | |
url = a.href; | |
return url; | |
} |
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
//除法函数,用来得到精确的除法结果 | |
//说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。 | |
//调用:accDiv(arg1,arg2) | |
//返回值:arg1除以arg2的精确结果 | |
function accDiv(arg1,arg2){ | |
var t1=0,t2=0,r1,r2; | |
try{t1=arg1.toString().split(".")[1].length}catch(e){} | |
try{t2=arg2.toString().split(".")[1].length}catch(e){} | |
with(Math){ | |
r1=Number(arg1.toString().replace(".","")); |
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
body { | |
width: 600px; | |
font:normal 14px/1.62 arial, sans-serif; | |
} | |
.mod { | |
margin-bottom:100px; | |
background-color:#efc; | |
} | |
.pic { | |
margin-right: 20px; |
NewerOlder