var script = document.createElement('script'); script.src = window.CityGisJs; script.type = 'text/javascript'; document.head.appendChild(script);