<html>
<head>
<title>
My HTML Designer on Mozilla
</title>
</head>
<body>
<iframe id="whizzEditor" name="whizzEditor" width="100%" height="100%" border="0"></iframe>
<script type="text/javascript">
document.getElementById("whizzEditor").contentWindow.document.designMode = "on";
document.getElementById("whizzEditor").focus();
</script>
</body>
</html>
<head>
<title>
My HTML Designer on Mozilla
</title>
</head>
<body>
<iframe id="whizzEditor" name="whizzEditor" width="100%" height="100%" border="0"></iframe>
<script type="text/javascript">
document.getElementById("whizzEditor").contentWindow.document.designMode = "on";
document.getElementById("whizzEditor").focus();
</script>
</body>
</html>
该博客展示了在Mozilla上进行HTML设计的代码。通过创建一个无边框的iframe元素,并使用JavaScript将其内容窗口的设计模式设为开启,最后让iframe获取焦点,实现了特定的HTML设计功能。
1万+

被折叠的 条评论
为什么被折叠?



