上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="jquery-3.3.1.js"></script> <style type="text/css"> *{ 阅读全文
posted @ 2020-04-22 10:11 gaoshengjun 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1:主要学习实现这种菜单的方法之一 结构:<ul> <li> <span>菜单1</span> <ul> <li></li> <li></li> </ul> </li> <li> <span>菜单2</span> <ul> <li></li> <li></li> </ul> </li> </ul> 阅读全文
posted @ 2020-04-21 13:22 gaoshengjun 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1:Dom对象获取元素的几种方式 //Dom对象获取元素的方式 document.getElementById("id"); //单个获取 document.getElementsByClassName("className"); //获取的多个 document.getElementsByTagN 阅读全文
posted @ 2020-04-21 10:38 gaoshengjun 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1:页面加载的几种写法 $(function(){}), jQuery(function(){}), $(document).ready(function(){}), $().ready(function(){}) $(document).ready(function () { console.lo 阅读全文
posted @ 2020-04-21 09:19 gaoshengjun 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 一、校验数字的表达式 数字:^[0-9]*$ n位的数字:^\d{n}$ 至少n位的数字:^\d{n,}$ m-n位的数字:^\d{m,n}$ 零和非零开头的数字:^(0|[1-9][0-9]*)$ 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(\.[0-9]{1,2})?$ 带1 阅读全文
posted @ 2020-04-20 11:25 gaoshengjun 阅读(142) 评论(0) 推荐(0) 编辑
摘要: https://www.runoob.com/css/css-tutorial.html //菜鸟工具 各种参考文档https://www.jb51.net/ 脚本之家 https://gitee.com www.bilibili.com b站 https://www.w3school.com.cn 阅读全文
posted @ 2020-04-20 11:06 gaoshengjun 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 浅拷贝:不能拷贝对象中的复杂属性 如 数组 和 内部的引用对象 //运用递归实现js的浅拷贝和深拷贝 var obj1 = { name : 'zs', age : 18, dog:{ name:'大黄', age:3 } }; var obj2 = {}; //完成对象的拷贝 浅拷贝主要能拷贝一些 阅读全文
posted @ 2020-04-18 17:48 gaoshengjun 阅读(427) 评论(1) 推荐(0) 编辑
摘要: 首先引用参考 https://www.jb51.net/article/158651.htm (脚本之家) 闭包的三大特点为: 1、函数嵌套函数 2、内部函数可以访问外部函数的变量 3、参数和变量不会被回收。 需求:运行每次点击li时会输入对应li的索引 实例:错误代码 1 输出结果会为最后一个li 阅读全文
posted @ 2020-04-18 14:41 gaoshengjun 阅读(837) 评论(0) 推荐(0) 编辑
摘要: 实例:(//在函数内部可以直接使用 arguments length name 等属性) 阅读全文
posted @ 2020-04-18 12:27 gaoshengjun 阅读(499) 评论(0) 推荐(0) 编辑
摘要: <script> call:实现功能 1:改变当前的this对象 2:可以去借用其他类的方法 fn.call(对象,参数1,参数2)//call用法1 //继承的实质就是抽取重复的代码 //父类 function Person(name,age,sex){ this.name = name; thi 阅读全文
posted @ 2020-04-17 17:37 gaoshengjun 阅读(269) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页