if(typeof(o)=="object"){
switch(o.tagName){
case "TEXTAREA":
case "INPUT":
_codetxt = o.value;
break;
case "DIV":
case "SPAN":
_codetxt = o.innerText;
break;
default:
_codetxt = o.innerHTML;
break;
}
}else{
_codetxt = o;
}
var _syn = new CLASS_HIGHLIGHT(_codetxt,syntax);
htmltxt = _syn.highlight();
return htmltxt;
}
</script>
<script language="JavaScript" type="text/javascript">
function plaster(){
document.form1.m.focus()
document.execCommand("Paste")
}
function goit(stx){
var code = document.getElementById("m").innerText;
var xx = new CLASS_HIGHLIGHT(code,stx);
document.getElementById("highlight").innerHTML = xx.highlight();
}
</script>
<form method="post">
<div><textarea rows="18"></textarea></div>
<input type="button" value="HTML" />
<input type="button" value="VB/VBScript" />
<input type="button" value="JavaScript" />
<input type="button" value="C#" />
<input type="button" value="SQL" />
<input type="button" value="XML" />
<input type="button" value="Java" />
<input type="button" value="粘贴" />
<input type="reset" value="清空内容" />
</form>
<div>
</div>
<div><div>
</div>
</body>
</html>
您可能感兴趣的文章: