随笔分类 - JavaScript
摘要:window.onresize = function(){ var width=$("body").width(); var height=$("body").height(); alert("height:"+height+" width:"+width) }
阅读全文
摘要:var date1= '2015/05/01 00:00:00'; //开始时间 var date2 = new Date(); //结束时间 var date3 = date2.getTime() - new Date(date1).getTime(); //时间差的毫秒数 // //计算出相差天
阅读全文
摘要:1、采用 Object.entries(cityMap) 2、采用 Object.values(cityMap)
阅读全文
摘要:var option = { tooltip: { show: false }, backgroundColor: '#0e1d3c', series: [ { name: '访问来源', ...
阅读全文
摘要:/** * 获取上个月月底日期 */ function getLastMonthAndDay(){ var nowDate = new Date(); var year = nowDate.getFullYear(); var month = nowDate.getMonth(); if(month == 0){ month = 12; ...
阅读全文
摘要://解决位置偏移var loadCount = 1; map.addEventListener("tilesloaded",function() { if (loadCount == 1) { map.setCenter(point); } loadCount = loadCo...
阅读全文
摘要:方式一: getBoundary:function (name,color) { var me= this; var bdary = new BMap.Boundary(); bdary.get(name, function(rs){ console.log(rs); var count = rs.b...
阅读全文
摘要:1、使用外部 TreeFilter.js 在项目中引用 Ext.define("Ext.ux.TreeFilter", { extend:"Ext.AbstractPlugin", alias:"plugin.treeFilter", collapseOnClear:true, allowParentFolders:false, init:funct...
阅读全文
摘要:init_yearMonth:function(itemId){ var me = this; var db = me.view.getCmp(itemId); db.datebox({ editable:false, prompt:'选择年月', validType:[], ...
阅读全文
摘要:结果测试:encode('zhongguo')"zhongguo" encode('中国')"[4e2d][56fd]"
阅读全文
摘要:if (str=="" || str==null) { return 0; } sb_strlen("afsdfav单方事故") 15
阅读全文
摘要:<script type="text/javascript"> var Sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] : (s
阅读全文
摘要:Scdp.define('Violation.view.ViolationView', { extend: 'Scdp.bootstrap.mvc.AbstractCrudView', modulePath: 'com/csnt/scdp/bizmodules/modules/projectViol
阅读全文
摘要:$(document).on('keyup','#valueDetil tbody .percentageEvent',function(){ // keyup 事件 绑定在什么元素上}).on('blur','#valueDetil tbody .percentageEvent',function
阅读全文
摘要:Math.max(10,40,30) 得到的结果为 40 Math.min(10,40,30) 取最小值 得到的结果为 10 $.isNumeric() 这个方法是用来判断 字符串是否是数字 如果是数字返回true 反正则返回false $.isNumeric("213") 返回true $.isN
阅读全文

浙公网安备 33010602011771号