Ctrl+/
IE11
F11
ESC
PgUp
PgDn
<html>
<head>
<title>HTML转JS代码在线工具</title>
<style>
.toolcode{margin:0 auto;}
h2{font:22px "微软雅黑";color:#333;background-color:lightgreen;}
h3{font-size:12px;font-weight:lighter;color:#666}
.tool {float:left;margin:12px 0 40px 0;}
.toolarea{padding:4px;margin:8px 0;width:650px;height:220px;color:#333;display:block}
</style>
</head>
<body>
<div class="toolcode" align="center">
<script language=JavaScript>
function rechange(){
document.getElementById('re').value=document.getElementById('oresult').value.replace(/document.writeln\("/g,"").replace(/"\);/g,"").replace(/\\\"/g,"\"").replace(/\\\'/g,"\'").replace(/\\\//g,"\/").replace(/\\\\/g,"\\")
}
function change(){
document.getElementById('oresult2').value="document.writeln(\""+document.getElementById('osource').value.replace(/\\/g,"\\\\").replace(/\\/g,"\\/").replace(/\'/g,"\\\'").replace(/\"/g,"\\\"").split('\n').join("\");\ndocument.writeln(\"")+"\");"
</script>
<h2>HTML转JS代码工具</h2>
<h3>请把HTML代码粘贴在这里:</h3>
<textarea class="toolarea" id="osource" onfocus="change()" onkeyup="change()"></textarea>
<h3>转换后的Js代码:</h3>
<textarea class="toolarea" id="oresult2"></textarea><br />
<h2>JS转HTML代码工具</h2>
<h3>把JavaScript代码粘贴在这里:</h3>
<textarea class="toolarea" id="oresult" onfocus="rechange()" onkeyup="rechange()"></textarea>
<h3>转换后的Html代码为:</h3>
<textarea class="toolarea" id="re"></textarea>
</div>
</body>
</html>
CSS代码...
JS代码...
xxxxxxxxxx