这篇文章写得挺好的

https://m.html.cn/qa/javascript/20201.html