欢迎阅读 js 八股文📌 jsQ1:如何确认this的值A:1、全局执行环境中 this指向window2、函数内部-this指向调用者1234function func(){ console.log(this) //window}func()12345function func(){ 'use strict' console.log(this) //undefined}func()3、对象方法调用-this指向对象1234567const food= { name: 'apple', eat() { console.log(this) }}food.eat() //food对象
Q2:如何指定this的值A:1、调用时指定call12345678function func(num1,num2){ console.log(this) console.log(num1,num2)}const pers ...
欢迎阅读 git学习笔记1. 基础操作指令git add (工作区——>暂存区)git commit (暂存区——>本地仓库)git log (查看提交记录)git status (查看工作区状态)git reset (版本切换)git reflog (查看所有提交记录)
2.分支git branch (查看分支)git branch xxx (创建分支)git checkout xxx (切换分支)git merge xxx (合并分支)git branch -d xxx (删除分支)
3.远程仓库git remote add origin xxx (添加远程仓库)git remote -v (查看远程仓库)git push origin master (推送到远程仓库)git pull origin master (从远程仓库拉取 自动合并)git push —set-upstream origin master (绑定分支)git clone xxx (克隆远程仓库)
git fetch (抓取)
4.解决冲突1.git pull2.git push
欢迎阅读 vue 八股文📌 vueQ1:不会冒泡的事件A:focus、blur事件、load、unload事件、scroll事件
Q2:Mouseenter、mouseover的区别A:mouseover会从子元素冒泡到父元素,mouseenter不会在子元素冒泡mouseover还在子元素上触发,mouseenter只在本元素上触发mouseenter检测首次进入元素的事件
Q3:MessageChanneI 是什么, 有什么使用场景?A:MessageChanne1 是一个JavaScript API, 用于在两个独立的执行环境之间建立双向通信的通道。MessageChanne1 提供了两个通信端点( portl 和port2 ) 可以在两 个不同的执行环境之间传递消息, 并通过事件监听的方式来处理这些消息。使用场景包括1 · WebWorkers通信2 · 不同浏览上下文(browsing context) 之间的通信3 ·可以用于在主线程和Shared Worker 之间建立通信通道4 · 服务端和客户端之间的通信5 · 异步任务处理: 在某些场景中, 使用MessageCh ...
本文记录了我使用 Hexo 搭建博客过程中的一些体验和技巧。
🎯 为什么选择 Hexo?Hexo 是一个基于 Node.js 的静态博客框架,特点是:
生成速度快 🚀
支持 Markdown 写作 📝
插件与主题生态丰富 🎨
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment