<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>代码转换器</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>BODY {
MARGIN-TOP: 24px; BACKGROUND-COLOR: white
}
H1 {
FONT: 20px 黑体,宋体; COLOR: black; TEXT-ALIGN: center
}
H1 SPAN {
FONT: bold 16px Verdana,Arial,宋体
}
TD {
FONT: 14px 宋体; COLOR: black
}
TEXTAREA {
FONT: 14px 宋体; COLOR: black
}
INPUT {
FONT: 14px 宋体; COLOR: black
}
</STYLE>
<SCRIPT language=javascript>
function paste() //粘帖
{
source.value="";
source.focus();
document.execCommand("paste");
if(source.value=="")
alert("您的剪切板中似乎没有任何文本内容 ^_^");
}
function make() //转换
{
if(source.value=="")
{
alert("文本框中没有任何代码哦 :(");
source.focus();
return;
}
var code=source.value.replace(/^/s*/,"").replace(//s*$/,"").split("/n");
result.value="";
var reop,rhop,stol,dnol;
rhop = (rhh[0].checked)?"'":'"';
reop = (rhh[0].checked)?/([/'//])/g:/([/"//])/g;
if(dww[0].checked)
{
stol = "document.writeln(";
dnol =")";
}
else
{
result.value+="var nin = "+rhop+"//n"+rhop+";/n";
result.value+="var "+dname.value+" = "+rhop+rhop+";/n";
stol = dname.value+"+=";
dnol ="+nin";
}
for(var i=0; i<code.length; i++)
result.value+=stol+rhop+code[i].replace(//s*$/,"").replace(reop,"//$1")+rhop+dnol+";/n";
}
function copy() //复制
{
if(result.value=="")
{
alert("什么都没有,你要复制什么呢?");
return;
}
result.focus();
result.select();
document.execCommand("copy");
}
function automake() //剪切板内容自动转换
新闻热点
疑难解答