javascript 积累
/**
* 判断是不是enter键
*
* @return
*/
function isEnter() {
if (window.event.keyCode == 13) {//event.keyCode
return true;
} else {
return false;
}
}
/**
*得到当前号加一字符串
*/
function getCurNumAddOne(curnum){
alert("hello invoice"+curnum);
var result;
var str=new String(curnum);//javascript 中的String
var intStr=str*1;
intStr++;
var result=new String(intStr);
while(result.length<str.length){
result="0"+result;
}
intStr='';
return result;
}
/**
*四舍五入
*/
function number(){
var a=3.13159265358279643383279
alert(a.toFixed(4));
}