Whing Dela Cruz
asked on
Replacing Javascript in the head of html5
I need to to replace the head of my Html5 (<head id="H14"></head>) through js but the newly script I attached on it won't work. The link and style works fine but the newly <script></script> won't work. Is there any idea how to do this?
Original <head>
Javascript
Hi experts, After replacing, the newjs won't work, all its function as well, but the old js (N75.js) still working. Please help me how to do this. Thank you!
Original <head>
<head id="H14">
<script src="UniJs.js"></script>
</head>
Javascript
var newjs = <script src="N75.js"></script>
document.getElementById('H14').innerHTML = newjs ;
Hi experts, After replacing, the newjs won't work, all its function as well, but the old js (N75.js) still working. Please help me how to do this. Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you both of you, leakim971 and Julian Hansen, your solution is so great where it works perfectly to my project. More power and God bless to both of you!
you welcome, have a nice day!
Open in new window