有没有办法异步加载Wordpress中的脚本?

I looked through the Wordpress documentation and couldn't find any mention of async javascript loading using wp_enqueue_script(), is it possible at all? I have a couple of scripts and would rather async load them to improve the user loading experience!

You can use wp_enqueue_script() to load a "script loader", which is a script that loads other scripts. That way, you are loading the bootloader synchronously, but the others asynchronously.

Your script-loader could contain this:

var scriptUrls = [URLS_HERE];

scriptUrls.forEach(function(url,index,scriptUrls){
  var script = document.createElement('script');
  document.getElementsByTagName('head')[0].appendChild(script);
  script.src = url;
});