摘要: 利用的es6+jQuery来实现的效果const bth=document.getElementById('bth');const shadow =document.getElementById('shadow');bth.addEventListener('click', (e)=> { shad 阅读全文
posted @ 2021-12-26 16:40 李小聪明 阅读(71) 评论(0) 推荐(0)
摘要: 添加了两个文本框一个提交按钮 <div class="pingJia" id="pingJia"> <p>用户评论</p> <span>购买用户:</span><input type="text" id="user" name="user"> <br> <span>产品反馈:</span><text 阅读全文
posted @ 2021-12-26 16:34 李小聪明 阅读(46) 评论(0) 推荐(0)
摘要: undefined也是一个原始值数据,我的理解是,当一个声明了但是未初始化的变量会默认赋值为字符串“undefined” <script> let num; console.log(num)//undefined </script>当我们直接输出全局window对象时,就可以找到undefined的 阅读全文
posted @ 2021-12-18 20:14 李小聪明 阅读(228) 评论(0) 推荐(0)
摘要: ① 取得文档中的元素 $('div.content').find('p'); ② 修改页面的外观 $('ul > li:first').addClass('active'); ③ 改变文档内容 $('#container').append('<a href="www.baidu,com">more< 阅读全文
posted @ 2021-12-18 20:07 李小聪明 阅读(29) 评论(0) 推荐(0)
摘要: 获得焦点后会触发动画:<p><input type="text" /> <span>focusout fire</span></p><p><input type="password" /> <span>focusout fire</span></p> $("p").focusin(function( 阅读全文
posted @ 2021-12-18 20:02 李小聪明 阅读(164) 评论(0) 推荐(0)
摘要: 1.当按下鼠标按钮时,隐藏或显示元素mousedown([[data],fn]): $("button").mousedown(function(){ $("p").slideToggle();}); 2.当鼠标指针进入(穿过)元素时,改变元素的背景色mouseenter([[data],fn]) 阅读全文
posted @ 2021-12-18 19:51 李小聪明 阅读(469) 评论(0) 推荐(0)
摘要: 在JQuery中提供了.hover()事件,以简化Dom中的mouseenter(鼠标进入),和mouseleave(鼠标离开)事件,hover的第一个参数(匿名方法)表示mouseenter,第二个参数表示mouseleave, over,out 描述: hover 改成over ,out $(" 阅读全文
posted @ 2021-12-18 19:43 李小聪明 阅读(52) 评论(0) 推荐(0)
摘要: 浏览器创建 Document 对象并解析 HTML,将解析到的元素和文本节点添加到文档中,此时document.readystate 为 loading HTML 解析器遇到没有 async 和 defer 的 script 时,将他们添加到文档中,然后执行行内或外部脚本。这些脚本会同步执行,并且在 阅读全文
posted @ 2021-12-03 16:02 李小聪明 阅读(202) 评论(0) 推荐(0)
摘要: left top position z-index 鼠标滚动距离:scorllTop:纵向距离 scorllLeft:横向距离 鼠标滚动事假:onscorll Jquery对象与Dom对象的相互转换 jquery对象转换为DOMD对象,jquery提供两种方法将jquery对象转换为DOM对象,即[ 阅读全文
posted @ 2021-12-03 15:56 李小聪明 阅读(77) 评论(0) 推荐(0)
摘要: ready(函数对象):页面加载时触发,需要加在body上 Hover(函数对象):鼠标悬浮时触发 Change(函数对象):元素发生改变,失去或者获得焦点时触发。 Click(函数对象):点击时触发 Dbclick(函数对象):双击时触发 Keydown(函数对象) Keypress(函数对象) 阅读全文
posted @ 2021-11-25 16:05 李小聪明 阅读(89) 评论(0) 推荐(0)