$("#dqxqzr").val(DateToString(new Date(data.dqxqzr)));
}
};
/**
* 日期类型转换成字符串型格式yyyy-MM-dd
* @param DateIn 转换对象
*
*/
var DateToString = function(DateIn) {
return DateIn.getFullYear()
+ '-'
+ (DateIn.getMonth() + 1 >= 10 ? DateIn
.getMonth() + 1 : '0'
+ (DateIn.getMonth() + 1))
+ '-'
+ (DateIn.getDate() >= 10 ? DateIn.getDate()
: '0' + (DateIn.getDate()));
};
/**
* 自定义map
*/
function map () {
this.elements = new Array();
//得到map的大小
this.size = function() {
return this.elements.length;
}
//判断是否为空
this.isEmpty = function() {
return (this.elements.length < 1);
}
//清空
this.clear = function() {
this.elements = new Array();
}
//放进map一个对象
this.put = function(_key, _value) {
this.elements.push( {
key : _key,
value : _value
});
}
//根据键去除一个对象
this.remove = function(_key) {
var bln = false;
try {
for (i = 0; i < this.elements.length; i++) {
if (this.elements[i].key == _key && typeof this.elements[i].key == typeof _key) {
this.elements.splice(i, 1);
return true;
}
}
} catch (e) {
bln = false;
}
return bln;
}
//根据键得到一个对象
this.get = function(_key) {
try {
for (i = 0; i < this.elements.length; i++) {
if (this.elements[i].key == _key && typeof this.elements[i].key == typeof _key) {
return this.elements[i].value;
}
}
} catch (e) {
return null;
}
}
//返回指定索引的一个对象
this.element = function(_index) {
if (_index < 0 || _index >= this.elements.length) {
return null;
}
return this.elements[_index];
}
//是否包含键
this.containsKey = function(_key) {
var bln = false;
try {
for (i = 0; i < this.elements.length; i++) {
if (this.elements[i].key == _key && typeof this.elements[i].key == typeof _key) {










