html 转换成asp教程 javascript教程 代码
function htmlphp教程(){
var input = document.htphp.input.value;
output = "Response.Write "";
for (var c = 0; c < input.length; c++){
if ((input.charAt(c) == "n" || input.charAt(c) == "r")){
output += "" & vbCrLf";
if (c != input.length - 1) output +="n Response.Write "";
c++;
}
else {
if (input.charAt(c) == "");") {
output += "\"";
}
else {
if (input.charAt(c) == "\"){
output += "\\";
}
else {
output += input.charAt(c);
if (c == input.length -1) output += "" & vbCrLf";
}
}
}
}
info="<% n" +
"#### 此代码由 工具啦(http://www.Tool.La) 转换 ####n" +
"nn"
info2="n Response.Write ""n" +
"%>";
document.htphp.output.value =info+output+info2;
}
<FORM name=htphp>
html代码
<TEXTAREA name=input rows=15 wrap=VIRTUAL cols=68></TEXTAREA>
asp代码
<TEXTAREA name=output rows=15 wrap=VIRTUAL cols=68></TEXTAREA>
</form>
<INPUT class=button onclick=htmlphp() type=button value=转换>