- 博客(7)
- 收藏
- 关注
原创 JS获取当前时间的年、月、日、时间等
var date = new Date();date .getYear(); //获取当前年份(2位)date .getFullYear(); //获取完整的年份(4位)date .getMonth(); //获取当前月份(0-11,0代表1月)date .getDate(); //获取当前日(1-31)date .getDay(); //获取当前星期X(0-6,0代表星期天)date .getTime(); //获取当前时间(从1970.1.1开始的毫秒数)date .getH
2020-12-02 17:16:20
41623
1
原创 echars设置属性参考
图表标题title: { x: 'left', // 水平安放位置,默认为左对齐,可选为: // 'center' ¦ 'left' ¦ 'right' // ¦ {number}(x坐标,单位px) y: 'top', // 垂直安放位置,默认为全图顶端,可选为:
2020-11-27 15:43:46
133
原创 鼠标移入显示提示框类似title属性功能
bindEvent: function () { var _this = this; _this.$element.find('.table-item-list .special').on('mouseover',function(e){ var val = $(this).text(); var thisWidth = $(this).width(); // 获取div 盒子的宽...
2020-11-27 11:26:22
1399
原创 拖拽优化
JS拖拽优化拖拽的实现原理:通过事件mousedown(事件的触发) →mousemove(事件的控制) →mouseup(事件的清除),拖拽的过程就是mousemove阶段;###问题产生的原因:因为mousemove 的间隔性触发,当两次mousemove事件触发的间隔中,鼠标移动距离出了element的范围,就会产生鼠标脱离element范围,拖拽就停止,解决方法: 将mousemove事件挂在docment,而不是对应的element,此时鼠标滑动只要不出docment范围就不会触发上述情况。
2020-11-17 19:20:50
310
原创 项目中常用的一些功能--jQuery
功能:title属性的拓展:对是否文本显示全没做出判断,当显示全时鼠标移上去不显示预览盒子;当显示不全时鼠标移上去显示预览盒子_this.$element.find('.event-dictionary-table-item-list .e-matter').on('mouseover',function(){ var val = $(this).text(); var thisWidth = $(this).width(); // 文本d
2020-11-05 11:24:46
162
原创 原生表格模板---jquery笔记
js文件;(function ($, window, document, undefined) { function EventDictionaryTableF(ele, opt) { var _this = this; _this.$element = ele; _this.defaults = { data: { } }; _this.data = {
2020-11-05 11:16:40
246
原创 jQuery之动画效果命令集合
1、show()显示效果语法:show(speed,callback) Number/String,Function speend为动画执行时间,单位为毫秒。也可以为slow",“normal”,“fast” callback可选,为当动画完成时执行的函数。show(speed,[easing],callback) Number/String easing默认是swing,可选linear;$("#div1").show(3000,function(){ alert(“动画显示完成!”); }
2020-09-08 16:54:48
272
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人