title: How to include external JavaScript on my Moodle page?
body: <p>In Moodle, while we use <code>$PAGE-&gt;requires-&gt;js_init_call()</code> to include a JS function defined in our plugin's <code>module.js</code> file, <strong>how can I include <em>external Javascript resources</em></strong>, which we normally include in the <code>&lt;head&gt;</code> tags like:</p>
  
  <pre><code>&lt;head&gt;
  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  
  &lt;title&gt;mypage&lt;/title&gt;
  
  &lt;script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/element/element-beta-min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/connection/connection-min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/tabview/tabview-min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>