It is a typo. document.getElementByID
should be document.getElementById
. You can easily spot it from the console.
37:27 Uncaught TypeError: document.getElementByID is not a function
Working fiddle:
1
solved How can I dynamically add an HREF as a field is filled out?