作者timpanii (eOltm)
看板Blog
标题Re: [分享] 自制的blogger版面
时间Thu Jan 12 23:22:33 2006
※ 引述《timpanii (eOltm)》之铭言:
:
※ 发信站: 批踢踢实业坊(ptt.cc)
: ◆ From: 218.184.163.247
: 推 chweng:不好意思 请问为什麽开出来是乱码呢 改过几种编码都一样.. 01/11 03:07
: → chweng:另外想请问 如果想用js的document.write写入html标签 01/11 03:07
: → chweng:会无法通过W3C Validation 请问这有办法解决吗? 01/11 03:08
: 推 timpanii:不好意思 编码有点问题 现在已经改好了 01/11 09:20
看你写入的位置而定
譬如说如果你写
<ul>
<script type="text/html">
..........
</script>
</ul>
这样W3C不会让你通过
但是如果你这样写
<script type="type/html">
<!--
document.write('<ul>');
.............
document.write('</ul>');
-->
</script>
就可以了
尽量在<script>和</script>之间用<!-- -->夹起来
因为W3C有时会误判 如上面如果没有<!-- --> 他会以为<ul> </ul>是真的html*
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.114.82.204