随笔分类 -  javascript

1
javascript,js,jquery...for Front Page!!!
摘要:一、环境配置: 1. npm create vue@latest #安装vue 3.5.13 2. cd projectDir 3. npm install # 安装vue 4. npm run dev # 运行:其实运行的是src/package.json 中的vite命令,和在控制台直接输入vi 阅读全文
posted @ 2025-01-02 10:42 龍飛鳯舞 阅读(25) 评论(0) 推荐(0) 编辑
摘要:一、前言:2009发布的js称为ES5,2015年发布的js称为ES6,之后不再叫ES,而是ECMAScript2016、ECMAScript2017...... 二、ECMAScript2016 不叫ES71. 查找数组中是否存在某个元素: const arr = [1,2,3,4]; conso 阅读全文
posted @ 2024-06-27 16:37 龍飛鳯舞 阅读(14) 评论(0) 推荐(0) 编辑
摘要:1、let定义变量:不能重复定义、作用域 2、const:定义常量 3、解构赋值:let [a,b,c] = [1,2,3];// a=1 b=2 c=3 4、箭头函数: function fn(a,b){ return a + b; } //等价于 let fn = (a,b) => { retu 阅读全文
posted @ 2020-04-16 22:09 龍飛鳯舞 阅读(156) 评论(0) 推荐(0) 编辑
摘要:先alert b 后a,类似于ajax异步,如果页面js过多影响页面加载,可以考虑此方法 阅读全文
posted @ 2019-12-11 17:44 龍飛鳯舞 阅读(241) 评论(0) 推荐(0) 编辑
摘要:前端缓存有cookie,localStorage,sessionStorage,webSQL,indexDB; cookie:有缺点 localStorage:功能单一 sessionStorage:会话级 webSQL:仅谷歌支持(标准查询语句) 重点 indexDB IndexedDB 就是浏览 阅读全文
posted @ 2019-12-11 16:40 龍飛鳯舞 阅读(834) 评论(0) 推荐(0) 编辑
摘要:$(function(){ var cpLock = true; $("input[name='name']").off().on({ compositionstart: function () {//中文输入开始 cpLock = false; }, compositionend: function () ... 阅读全文
posted @ 2018-12-25 20:33 龍飛鳯舞 阅读(140) 评论(0) 推荐(0) 编辑
摘要:var dd = $(".drag_bott").removeAttr('id').last().attr('id','drag_bott'); var drag = document.getElementById("drag_bott"); function moveButton(){ obj = this; var intX = event.targetTouches[0].... 阅读全文
posted @ 2018-07-20 15:01 龍飛鳯舞 阅读(2372) 评论(0) 推荐(0) 编辑
摘要:jquery扩展分为对象扩展和jquery本身类扩展: 对象扩展: 使用方法: jquery本身类扩展: 使用方法: 阅读全文
posted @ 2018-05-09 10:57 龍飛鳯舞 阅读(140) 评论(0) 推荐(0) 编辑
摘要:客户端 服务端 阅读全文
posted @ 2018-04-26 10:29 龍飛鳯舞 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-12-26 17:27 龍飛鳯舞 阅读(169) 评论(0) 推荐(0) 编辑
摘要:css1: css2: 阅读全文
posted @ 2016-12-16 09:16 龍飛鳯舞 阅读(203) 评论(0) 推荐(0) 编辑
摘要:DOM extend 1 2 3 4 阅读全文
posted @ 2016-12-14 08:58 龍飛鳯舞 阅读(182) 评论(0) 推荐(0) 编辑
摘要:/** * 属性 * childNodes 子节点 * nextSibling 下一个节点 * previousSibling 上一个节点 * parentNode 父节点 * firstChild 第一个子节点 * lastChild 最后一个子节点 * hasChildNodes 判断是否有子节... 阅读全文
posted @ 2016-12-09 09:10 龍飛鳯舞 阅读(147) 评论(0) 推荐(0) 编辑
摘要:var obj = {'a':'a'}; var fun = function (){} console.log(typeof obj);//object console.log(typeof fun);//function var a; console.log(a === undefined);//true console.log(typeof b);//true 未声明的变量使用会报错,但是... 阅读全文
posted @ 2016-11-26 23:06 龍飛鳯舞 阅读(401) 评论(0) 推荐(0) 编辑
摘要:javascript面向对象和php不太一样,语法不太相同,总结如下 阅读全文
posted @ 2016-10-19 14:48 龍飛鳯舞 阅读(128) 评论(0) 推荐(0) 编辑
摘要:1、万物皆对象;所有的属性和方法都隶属于window document.getElementById('id') = window.document.getElementById('id') 获取浏览器可视区域的万能方法 var w = window.innerWidth || document.d 阅读全文
posted @ 2016-08-19 11:18 龍飛鳯舞 阅读(260) 评论(0) 推荐(0) 编辑
摘要:通过对canvas的初步了解,经过几天的总结,吧canvas的基本用法总结如下:方便以后查阅 阅读全文
posted @ 2016-06-24 17:36 龍飛鳯舞 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-04-06 14:13 龍飛鳯舞 阅读(1070) 评论(0) 推荐(0) 编辑
摘要:js二级联动效果 阅读全文
posted @ 2015-11-12 16:13 龍飛鳯舞 阅读(238) 评论(0) 推荐(0) 编辑
摘要:jquery带按钮的图片切换效果 prev next 1 2 3 4 不多说效果如下:以上代码就是完整的切换效果,也是最简单的原理,希望能够学习 阅读全文
posted @ 2015-10-20 17:27 龍飛鳯舞 阅读(290) 评论(0) 推荐(0) 编辑

1
点击右上角即可分享
微信分享提示