script的type为text/tpl,写入html IE6,7,8下报错
<script id="tpl" type="text/tpl">
11111111111
</script>
<script type="text/javascript">
"use strict"
<!--111->
var tpl = document.getElementById("tpl");
alert(tpl.innerHTML);
tpl.innerHTML = 2222;
</script>
11111111111
</script>
<script type="text/javascript">
"use strict"
<!--111->
var tpl = document.getElementById("tpl");
alert(tpl.innerHTML);
tpl.innerHTML = 2222;
</script>
在IE6,7,8下面报错
IE9,10以及其他标准浏览器都没问题
【总结】script的type为text/tpl,除了html IE6,7,8都能读写,而IE6,7,8只能读取,不能写入