I want to use document.getElementById in the src of script tag
like this:
<div id="testTracking">
<script type="text/JavaScript" language="JavaScript" src="https://test.com/tracking/hio_wm.js?state="+document.getElementById("state").value+ "&zip=" +document.getElementById("zipcode").value+ ""></script>
</div>
Can it is possible to use document.getElementById tags within SRC attribute of Script tag .
If No then plz suggest how it can be possible .
Thanks
ok, you can do it with document.write but you have to make sure that the DOM is already fully loaded. You can use jQuery for that.