function changeIt(){
//alert('yes');
var content = document.getElementById("content");
var InputBox = document.getElementById("InputBox");
var Mytext;
Mytext=InputBox.innerHTML;
Mytext=Mytext.replace(/</g,"
Mytext=Mytext.replace(/>/g,">");
content.innerHTML=Mytext;
}
id="InputBox"
οnkeydοwn="changeIt();">
here...
------------------------------
下面的是css编辑器
css测试器#top{
height:200px;
}
style{
display:block;
padding:0.6em 0.8em;
border:1px dashed #ccc;
background-color:#f5f5f5;
color:#000;
font-family:Monaco,
monospace;
font-size:12px;
white-space:pre-wrap;
word-wrap:break-word;}
}
*{color: #f00; }
aaaaa