Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在使用$.getScript获取一些 javascript 后,我现在想删除此脚本。如何才能做到这一点。
$.getScript
您不能删除已加载的脚本。没有这样的概念。您必须调整此脚本,使其根据某些运行时条件按您预期的方式运行。因此,例如,如果此脚本执行某些操作,您将必须修改此脚本,以便它根据您指定的某些条件执行此操作。通过这种方式,您可以控制此脚本的行为方式。