- h5语义化标签
- c3的新特性
- http的状态码:304 403 401
- cookie,localstorage,sessionStorage的区别
- v-for和v-if的优先级
- get和post的区别,get为什么比post的快
- for循环嵌套定时器,如何输入1,2,3,
- ajax的数据类型???
- 组件和插件的区别
- localstorage受同源策略的限制吗??
- 接口幂等性
- https的原理
- iframe的优缺点??
- websocket??
- 求执行结果
async function async1(){
console.log('async1 start');
await async2();
console.log('async1 end');
}
async function async2(){
console.log('async');
}
console.log('script start');
setTimeout(function (){
console.log('setTimeout');
},0);
async1();
new Promise(function(resolve){
console.log('promise1');
resolve();
}).then(function(){
console.log('promise2');
});
console.log('script end');
/**
* 实现 compare 方法,比较两个版本号的大小,版本号规则 a.b.c.d,abcd 均为大于等于 0 的整数
如果 version1 > version2 返回1
如果version1 < version2,返回 -1
相等返回 0
*/
compare('10.2.56.6001', '10.2.58.5001'); // 返回-1
compare('10.2.56.6001', '10.2.54.5001'); // 返回 1
compare('10.2.56', '10.2.56.1'); // 返回 0
function compare(version1, version2) {
}
- 从浏览器开始输入网址到页面渲染出来,这过程发生了什么?
<!-- 其中 ?t=6000 表示改请求会延迟6000ms返回,依次类推 -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="./zz.css?t=6000">
</head>
<body>
<h1>第一行</h1>
<link rel="stylesheet" href="./zzz.css?t=4000">
<h1 id="second">第二行</h1>
<script src="./zz.js"></script>
</body>
</html>
body {
background-color: blue;
}
#second {
color: red;
}
(() => {
console.log('console from a.js');
})();