<script>
function toScript(val)
{
var value = val.value
value = value.replace(gi,"").replace(/"/gi,"///"").replace(/'/gi,"///'")
valArr = value.split("/r/n")
value=""
for (i=0; i<valArr.length; i++)
{
value += (i==0) ? "info =" : ""
value += " /"" + valArr
value += (i!=valArr.length-1) ? "/" +/"//n/"+/n" : "/"/n"
}
value+="/ndocument.write(info)"
val.value = value
}
</script>
<input type=button value="将 HTML 转为 JavaScript" οnclick=toScript(document.all["code"])><br>
<textarea id=code cols=75 rows=20>
<table width="300">
<tr><td align="right">A</td></tr>
</table></textarea>
function toScript(val)
{
var value = val.value
value = value.replace(gi,"").replace(/"/gi,"///"").replace(/'/gi,"///'")
valArr = value.split("/r/n")
value=""
for (i=0; i<valArr.length; i++)
{
value += (i==0) ? "info =" : ""
value += " /"" + valArr
value += (i!=valArr.length-1) ? "/" +/"//n/"+/n" : "/"/n"
}
value+="/ndocument.write(info)"
val.value = value
}
</script>
<input type=button value="将 HTML 转为 JavaScript" οnclick=toScript(document.all["code"])><br>
<textarea id=code cols=75 rows=20>
<table width="300">
<tr><td align="right">A</td></tr>
</table></textarea>