A User-Defined Element could be inserted as follows:
2.From the Insert menu or context menu, select the command for inserting a User-Defined Element.
4.Click OK to finish.
You can also use a User-Defined XML Block to achieve the same result. To do this use the same procedure as described above for User-Defined Elements, with the only differences being (i) that a User-Defined XML Block is inserted instead of a User-Defined Element, and (ii) that the SCRIPT element is inserted as a complete XML block, that is, with start and end tags.
var script = document.createElement('script');
script.src = 'file:///c:/Users/Desktop/test.js';
var head = document.getElementsByTagName('head');