这段代码有什么区别
var head=document.getElementsByTagName('head')[0]
var script=document.createElement('script')
script.setAttribute('type', 'text/javascript')
script.setAttribute('src', "http://your-script.com/address-here.js")
head.appendChild(script)
和这段代码
<script type="text/javascript" src="http://your-script.com/address-here.js">
</script>
谢谢你。