当前位置:网站首页>查漏补缺(八)
查漏补缺(八)
2022-04-23 05:53:00 【KK要继续努力】
查漏补缺(八)
css选择器权重
JS>内联样式>ID选择器>类选择器>伪类选择器=属性选择器>伪元素选择器>通用选择器
伪元素和伪类元素的区别
- 伪类是在已有DOM标签的基础上,根据不同状态产生对应的样式,状态根据用户行为动态变化;伪元素则是在一个不存在的DOM上为其添加样式;
- 伪类元素使用冒号(:),伪元素使用双冒号(::);
- animation-timing-function:linear、ease、jump、step
- cellIndex是td标签的属性
- join()把一个数组转换成字符串,如果括号里没有值,默认以逗号分隔
- reduce()是一个累加器:求数组值的和、求数组最大值、数组去重
参考文章:https://www.cnblogs.com/amujoe/p/11376940.html
['a','b','c'].join() //'a,b,c'
['a','b','c']+'' //'a,b,c'
['a','b','c'].reduce((a,b)=>a+b,'') //'abc'
['a','b','c'].join('') //'abc'
- 数组与字符串相加,转换成各自的字符串再加
- +'3’是number类型
- new Number是一个内置的函数构造函数。 虽然它看起来像一个数字,但它并不是一个真正的数字:它有一堆额外的功能,是一个对象。
译者注:==会引发隐式类型转换,右侧的对象类型会自动拆箱为Number类型。
然而,当我们使用===操作符时,类型和值都需要相等,new Number不是一个数字,是一个对象类型。两者都返回 false。
TCP协议通过使用连续ARQ协议和滑动窗口协议,来保证数据传输的正确性,从而提供可靠的传输
箭头函数没有自己的this,arguments,super或new.target
脚本
放中的情况:脚本会优先加载,但加载过程中,还没加载完,会使脚本访问不到中的元素。
放底部:脚本在加载后加载,能够保证脚本有效地访问的元素。
例外情况:脚本中没有访问元素的情况下,两种加载方式效果一致。
http请求返回码
使用Promise封装Ajax操作
return new Promise(function(resolve, reject){
var req = new XMLHttpRequest();
req.open("POST", "www.baidu.com", true);
req.onload = function(){
if(req.readyState === 4 && req.status === 200){
resolve(req.response);
} else {
reject(req.statusText);
}
}
req.onerror = function(){
reject(Error("网络异常"));
}
});
版权声明
本文为[KK要继续努力]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_45393020/article/details/123409072
边栏推荐
猜你喜欢
[UDS unified diagnosis service] IV. typical diagnosis service (1) - diagnosis and communication management function unit
查漏补缺(六)
VHDL finite state machine (FSM) code example
[UDS] unified diagnostic service (UDS)
Shell脚本 &&和||的使用
VHDL-任意分频器(50%占空比)
js根据名字将数组对象中名字相同的项组成一个相同的数组
CUDA environment installation
CUDA环境安装
Collection of practical tips for C language (continuously updated)
随机推荐
Notes on advanced points of C language 5
HDU-Tunnel Warfare
CUDA environment installation
Vs can be compiled, but there will be a red underline to indicate the problem of undefined identifiers
Matching between class template with default template argument and template parameter
ES6
QT icon application
Krypton zeal
三极管原理及特性分析
ES6新增方法
js根据名字将数组对象中名字相同的项组成一个相同的数组
Set up a personal blog of jpress
在visual stdio中运行qt程序
Using printf in MFC
基于Keras的时装分类案例
Understanding of SSH public key and private key
PN结、二极管原理详解与应用
Introduction to nonparametric camera distortion model
Krypton binary
生成快捷方式