以下代码适用于 Firefox 3.6,但不适用于 Internet Explorer 8:
<html>
<head>
<title>Example</title>
<script type="text/javascript">
function init() {
alert(document.designMode);
document.designMode = "on";
alert(document.designMode);
}
</script>
</head>
<body onload="init()">
</body>
</html>
在 FF 中,警报显示“关闭”,然后显示“开启”;在 IE 中,它们都是“关闭”的。
我究竟做错了什么?