index.html
<script src="./a.js"></script>
<script src="./b.js"></script>
a.js
const show = ()=> console.log("--a--调用成功了");
b.js
const one = () => show()
// 页面渲染后触发
window.onload = () => one()
10-13
5万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-21
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-06
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)