您的位置:首页 > 健康 > 养生 > 网站三要素_游戏网页界面设计_网页分析工具_四种营销模式

网站三要素_游戏网页界面设计_网页分析工具_四种营销模式

2025/4/29 18:37:25 来源:https://blog.csdn.net/qq_34425377/article/details/147576430  浏览:    关键词:网站三要素_游戏网页界面设计_网页分析工具_四种营销模式
网站三要素_游戏网页界面设计_网页分析工具_四种营销模式

美团社招一面
做题
1、面试题

<style>
.outer{width: 100px;background: red;height: 100px;
}.inner {width: 50px;height: 50px;background: green;
}</style>
<div class="outer"><div class="inner"></div>
</div><script>var outer = document.querySelector('.outer');var inner = document.querySelector('.inner');new MutationObserver(function () {console.log('mutate');}).observe(outer, {attributes: true,});function onClick(e) {console.log('click');setTimeout(function () {console.log('timeout');}, 0);Promise.resolve().then(function () {console.log('promise');});outer.setAttribute('data-random', Math.random());}inner.addEventListener('click', onClick);outer.addEventListener('click', onClick);
</script>

2、js

function Foo() {getName = function () { console.log (1); };return this;
}
Foo.getName = function () { console.log (2);};
Foo.prototype.getName = function () { console.log (3);};
var getName = function () { console.log (4);};
function getName() { console.log (5);}Foo.getName();//
getName();//
Foo().getName();//
getName();//
new Foo.getName();//
new Foo().getName();//
new new Foo().getName();//

3、
题目:
使用Vue3 / react 分别实现倒计时功能
10-0,到0时自动停止
设置3个按钮,开始 暂停 重置
解答:

注意:记得定时器使用的坑,以及取消页面挂载的时候移除定时器

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com