/**--------------------基本配置--------------------**/
//基本路径
var sys_Root='https://www.baidu.com';
//接口路径
var sys_joggle='https://www.baidu.com/api.php';
/**
* 获取全局变量
* @param p 参数
* @returns {any|Object}
*/
function fun_getConfig(p){
return eval('sys_'+p);
}
/**-----------------------------Data----------------------**/
/**
* 格式化时间
* @param fmt 定义格式yyyy-MM-dd hh:mm:ss(var time1 = new Date().Format("yyyy-MM-dd hh:mm:ss"))
* @returns {*}
* @constructor
*/
Date.prototype.Format = function(fmt) {
var o = {
"M+" : this.getMonth()+1, //月份
"d+" : this.getDate(), //日
"h+" : this.getHours(), //小时
"m+" : this.getMinutes(), //分
"s+" : this.getSeconds(), //秒
"q+" : Math.floor((this.getMonth()+3)/3), //季度
"S" : this.getMilliseconds() //毫秒
};
if(/(y+)/.test(fmt)) {
fmt=fmt.repla
js公共方法库
最新推荐文章于 2024-05-27 21:09:20 发布