在html页面加上DTD与不加DTD的差异
比如这样一段代码:
<script type="text/javascript">//<![CDATA[ function show(){ alert("hello,world"); } document.body.onmousedown=show;//]]</script><!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> <style> div{ height:200px; border:1px solid red; } </style> </head> <body> <div>div</div> <script type="text/javascript"> //<![CDATA[ function show(){ alert("hello,world"); } document.body.onmousedown=show; //]]</script> </body></html>