1. 使用document.scripts;

document.scripts instanceof HTMLCollection;
// true

 

2. 使用 document.getElementsByTagName();

document.getElementsByTagName("script");

 

3. 使用 document.querySelectorAll();

document.querySelectorAll("script");

 

相关文章:

  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案