保存成html或者访问这里.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>HTML转换工具</title>
<script type="text/javascript" language="JavaScript">
<!--
function encode() {
var o = document.getElementById("htmlcode");
var htmlcode = o.value;
htmlcode = htmlcode.replace(/</g, "<");
htmlcode = htmlcode.replace(/>/g, ">");
o.value = htmlcode;
}
-->
</script>
</head>
<body>
<textarea id="htmlcode" style="width:100%;height:90%;">
</textarea>
<input type="button" onclick="encode();" value="转换" />
</body>
</html>
将转换好的代码添加到以下标签中.
<pre class="code"> 转换好的html代码 </pre>
将以下css代码添加到head之间
pre.code {
display: block; /* fixes a strange ie margin bug */
font-family: Courier New;
font-size: 10pt;
overflow:auto;
background: #f0f0f0 url(http://w.886.cn/4gYC/111864766/111864766_13194_b.gif) left top repeat-y;
border: 1px solid #ccc;
padding: 10px 10px 10px 21px;
max-height:200px;
line-height: 1.2em;
}
转载声明: 出自: Ghoul To World!作者: GreatGhoul

沒有看懂~~~
ReplyDelete那個如何請問一個問題~~如何產生一離開或刷新介面時出現的馬賽克效果~~可否賜教~~