比如 response.write" <td width ...... “格式
<td width=150 align=center><a href="./" onclick=""href='look.asp?id="&11&" target="main"'>gggg</a></td>
声明以下是楼上的东西 [CODE] <script> function toJavaScript(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[i] value += (i!=valArr.length-1) ? "\" +\"\\n\"+\n" : "\"\n" } value+="\ndocument.write(info)" val.value = value }
function toVBScript(val) { var value = val.value value = value.replace(/\"/gi,"\"\"")
valArr = value.split("\r\n") value="" for (i=0; i<valArr.length; i++) { value += (i==0) ? "info =" : "" value += "\"" + valArr[i] value += (i!=valArr.length-1) ? "\" & vbCrlf & _\n" : "\"" } value+="\ndocument.write(info)" val.value = value; }
function toVBScriptASP(val) { var value = val.value value = value.replace(/\"/gi,"\"\"") valArr = value.split("\r\n") value="<%\n" for (i=0; i<valArr.length; i++) { value += (i==0) ? "info =" : "" value += "\"" + valArr[i] value += (i!=valArr.length-1) ? "\" & vbCrlf & _\n" : "\"" } value+="\nResponse.Write info\n%>" val.value = value; }
</script>
<input type=button value="将HTML转为JavaScript" onclick=toJavaScript(document.all["code"])> <input type=button value="将HTML转为VBScript" onclick=toVBScript(document.all["code"])> <input name="button" type=button onclick=toVBScriptASP(document.all["code"]) value="将HTML转为VBScript(ASP)"> <br> <textarea id=code cols=90 rows=20> <table width="300"> <tr><td align="right">A</td></tr> </table></textarea> [/CODE]