Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

load script js

// Create new script element
const script = document.createElement('script');
script.src = '/path/to/js/file.js';

// Append to the `head` element
document.head.appendChild(script);
Source by htmldom.dev #
 
PREVIOUS NEXT
Tagged: #load #script #js
ADD COMMENT
Topic
Name
5+7 =