js :常用方法
1.触发器:trigger
https://www.cnblogs.com/Renyi-Fan/p/9291123.html
2.放大缩小
//缩小
narrow: function() {
if (csz <= 0.2) {
return;
}
csz = csz - 0.1;
$('.zdt-map-grid').css('transform','scale(' + csz +')');
},
//放大
enlarge: function() {
csz = csz + 0.1;
$('.zdt-map-grid').css('transform','scale(' + csz +')');
},
3.删除数组尾部元素
改变数组的length值:
const arr = [11, 22, 33, 44, 55, 66];
arr.length = 3;
console.log(arr); //=> [11, 22, 33]
JSON.stringify
JSON.parse