会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
NIE-小菜鸟的笔记
博客园
首页
新随笔
联系
订阅
管理
2022年5月20日
学得超烂的一天---之组件封装的意义
摘要: 这一步没有封装 是为了 自己能更好的理解 封住组价 的意义 了解 组件之间的关系 这段代码 运行的结果 也会给出下列 gif图 第二步 点击当前水果 ,把水果的名字 输出到--> div后面 这时候 用个变量 去接收 插值{{}} 第三步 开始思考 封装 概念 其实这个li标签 应该被封装
阅读全文
posted @ 2022-05-20 01:41 NIEandyou
阅读(36)
评论(0)
推荐(0)
2022年4月12日
WebAPI-06代码练习---05发布微博小案例
摘要: <title>发布微博小案例</title> </head> <body> <textarea class="publish"></textarea> <button>发布</button> <ul></ul> <script> //1.获取发布按钮的dom元素 const but=document
阅读全文
posted @ 2022-04-12 01:12 NIEandyou
阅读(50)
评论(0)
推荐(0)
WebAPI-06代码练习---04--键盘按键
摘要: <body> <script> //给body标签绑定键盘按下事件 keydown document.body.addEventListener('keydown',function(event){ console.log(event); //当下按下的案件 }) </script> </body>
阅读全文
posted @ 2022-04-12 00:22 NIEandyou
阅读(22)
评论(0)
推荐(0)
WebAPI-06代码练习---03-事件对象常见属性
摘要: <style> div{ width: 300px; height: 400px; background-color: aqua; margin-left: 300px; } </style> </head> <body> <div>点击点击</div> <script> // 获取按钮 const
阅读全文
posted @ 2022-04-12 00:15 NIEandyou
阅读(18)
评论(0)
推荐(0)
WebAPI-06代码练习---02-事件对象
摘要: <button>点击</button> <script> //获取button标签的dom元素 const but=document.querySelector('button') //绑定鼠标点击事件 but.addEventListener('click',function(event){ co
阅读全文
posted @ 2022-04-12 00:13 NIEandyou
阅读(16)
评论(0)
推荐(0)
WebAPI-06代码练习---01-const和let
摘要: <script> let name='猪猪' name='狗狗' console.log(name); const name1='猪猪' name1='狗狗' console.log(name1); /* 总结: 1.const和let一样 也能声明变量 2.const声明变量不能被修改 let 可
阅读全文
posted @ 2022-04-12 00:12 NIEandyou
阅读(24)
评论(0)
推荐(0)
公告