摘要:
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <title>公告滚动</title> 6 <meta http 阅读全文
摘要:
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <title>输入框限定只输入数字</title> 6 <met 阅读全文
摘要:
1 //禁止鼠标右键 2 document.oncontextmenu = function(){ 3 return false; 4 } 5 document.onkeydown = function(){ 6 var e = window.event || arguments[0]; 7 if( 阅读全文
摘要:
1 Array.prototype.in_array = function(element){ 2 for(var i=0;i<this.length;i++){ 3 if(this[i] == element){ 4 return true; 5 } 6 } 7 return false; 8 } 阅读全文
摘要:
1 var effectiveDecimal = function(num,fix){ 2 //num为要处理的数字 3 //fix为所要保留的有效小数位数 4 var fixed = fix || 2; //若fix不存在,则默认保留两位有效小数 5 var shuffle = Math.pow( 阅读全文
摘要:
1 var checkIEVersion = function(){ 2 var browser = navigator.appName; 3 var b_version = navigator.appVersion; 4 var version = b_version.split(";"); 5 阅读全文
摘要:
1 var checkIE = function(){ 2 if(navigator.appName == 'Microsoft Internet Explorer' || navigator.userAgent.indexOf("Trident") > 0){ 3 return true; 4 } 阅读全文
摘要:
1 var getThousandNum = function(val){ 2 var re = /(?=(?!(\b))(\d{3})+$)/g; 3 return val.indexOf(".")>=0 ? val.split(".")[0].replace(re, ",") + "." +va 阅读全文
摘要:
1 var convertCurrent = function(currencyDigits){ 2 var MAXIMUM_NUMBER = 99999999999.99; //设置最大值 3 4 var CN_ZERO = "零"; 5 var CN_ONE = "壹"; 6 var CN_TW 阅读全文