摘要:
获取ID /** * * @param {*} id 获取ID * @returns */ function $(id){ return typeof id 'string'?document.getElementById(id):null; } // 使用方法 console.log($('tex 阅读全文
摘要:
houseObj.listen = function(key,fn){ // if(!this.listen[key]){ // this.listen[key] = []; // }else{ // this.listen.push(fn); // } (this.listen[key] || ( 阅读全文
摘要:
// 优化前 app.get = function(){} app.post = function(){} app.put = function(){} // 优化后 var menthod = ['put','get','post']; menthod.forEach(function(key){ 阅读全文
摘要:
const el = document.getElementById('test'); el.style.cssText = `border-left:1px;padding:5px` 阅读全文
摘要:
mydiv{ max-height:910px; overflow:auto; } mydiv::-webkit-scrollbar{ width:8px; height:8px; background-color: #61B6EB; } mydiv::-webkit-scrollbar-track 阅读全文
摘要:
// 经纬度转换成三角函数中度分表形式。 function rad(d) { return d * Math.PI / 180.0; } // 根据经纬度计算距离,参数分别为第一点的纬度,经度;第二点的纬度,经度 function getDistance(lat1, lng1, lat2, lng2 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <style type='text/css'> .circle { width: 200px; height: 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文