<html>
<title>HTML<-->JS转换器</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
BODY {
BACKGROUND-COLOR: #FFFFFF; BORDER-RIGHT: #000000 0px outset; COLOR: #000000; FONT-SIZE: 9pt; LINE-HEIGHT: 14px; MARGIN-LEFT: 0px; TEXT-DECORATION: none; margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
border:2 #cccccc solid
}
.bu{
BACKGROUND-COLOR: #f7f7f7; BORDER-BOTTOM: #999999 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #ffffff 1px solid; COLOR: #000000; FONT-SIZE: 9pt; HEIGHT: 22px; WIDTH:80px
}
.tx1{font-size:12px;border:1px solid;border-color:black black #000000;color: #0000FF}
-->
</style>
<script language="javascript" type="text/javascript">
function rechange(){
re.value=oresult.value.replace(/document.writeln\("/g,"").replace(/"\);/g,"").replace(/\\\"/g,"\"").replace(/\\\'/g,"\'").replace(/\\\//g,"\/").replace(/\\\\/g,"\\")
}
function change(){
oresult2.value="document.writeln(\""+osource.value.replace(/\\/g,"
\\\\").replace(/\//g,"\\/").replace(/\'/g,"\\\'").replace(/\"/g,"\\\"").split('\r\n').join("\");\ndocument.writeln(\"")+"\");"
}
</script>
</head>
<body>
<center><font color=bule size=4>HTML<-->JS转换器</font><P></P>
>>把代码从 HTML 格式转为 JS 格式<<
<br>
<textarea cols="70" rows="10" class=tx1 id="osource" onpropertychange="change()"></textarea>
<br>下面表单中是相应的 <strong>Js</strong> 代码: <br>
<textarea cols="70" rows="10" class=tx1 id="oresult2" ondblclick='this.select();oresult.createtextrange().execcommand("copy")'></textarea>
<br>>>把代码从 Js 格式转为 Html 格式<<
<br><textarea cols="70" rows="10" class=tx1 id=oresult ondblclick='this.select();oresult.createtextrange().execcommand("copy")' onpropertychange=rechange()></textarea>
<br>下面表单中是相应的 <strong>Html</strong> 代码: <br>
<textarea cols="70" rows="10" class=tx1 name="textarea" id=re ondblclick='this.select();this.createtextrange().execcommand("copy")'></textarea>
</center></body>
</html>