摘要:
function agomonth(x) { var date = new Date(); date.setMonth(date.getMonth()-x); return date.getFullYear()+'-'+(date.getMonth()+1)+'-01' } 调用月份处理函数:时间设 阅读全文
摘要:
1锚链接的实现 <a id="backBtn" style=" position:fixed;top:75%;left:50%; text-decoration:none; cursor:pointer; margin-top:-50px; margin-left:640px;padding:3px 阅读全文
摘要:
介绍:Leaflet是一个开源的JavaScript库,对移动端友好且对地图有很好的交互性。 大小仅仅只有 33 KB, 同时具有大多数地图所需要的特点。 Leaflet设计的非常简单易懂, 同时具有很好的性能和易用性。 它在桌面端和移动端都工作的相当高效,并有大量的插件用于扩张Leaflet的功能 阅读全文
摘要:
使用gulp拷贝文件,可以完成开发api环境变量的配置,例如公司的线上环境有三个: 1.alpha线上测试环境 2.dev线上测试环境 3.test 本地测试环境 (4.production 正式系统环境) 各个环境的apIhost不一样,在开发中每次更改url会很不方便,所以用到gulp可以完成环 阅读全文
摘要:
[].forEach.call($$("*"),function(a){ a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)}) 尝试在你浏览器的Console(F12)中运行一下,你会发现页面被不同的颜色块高 阅读全文
摘要:
示例代码: var suggestion_source = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace("display_name"), queryTokenizer: Bloodhound.tokeni 阅读全文
摘要:
在series中的数据组加个属性,yAxisIndex: 1,表示第二个数据用的是第二个y轴,不加这个属性的话都是默认0,即第一个属性,再配置yAxis的值第一个为左侧坐标轴,右册坐标轴为第二个配置参数的值. optionC = { tooltip: { trigger: 'axis' }, leg 阅读全文
摘要:
var params = (function(obj){ var string = []; for(var key in obj){ string.push(window.encodeURI(key)+'='+window.encodeURI(obj[key])); } return string. 阅读全文
摘要:
<div class="search"> <input type="text"></div> .search{ text-align: center;}.search input{ margin: 0 auto; padding: 0 10px; width: 536px; height: 34px 阅读全文
摘要:
str.toLowerCase().indexOf(str.toLowerCase())>=0; 对字符串进行统一小写转换. indexOf()查找到返回索引值大于=0; 未找到,返回-1; input 输入框快速查找app 阅读全文