当前位置:编程学习 > asp >>

在线调试服务端js代码的asp源码


<%@language="javascript" codepage="936"%><html><head>
<title>Asp Test</title>
</head><body scroll="auto">
<%if (Request.ServerVariables("REQUEST_METHOD").Item == "POST")
{
    var svrInfo = "代码执行成功";
    try
    {
        eval(Request.Form("Code").Item);
    }
    catch(err)
    {
        svrInfo = err.message;
    }
    Response.Write("<div>" + svrInfo + "</div>");
}
else
{%><table width="100%" height="100%" style="table-layout:fixed">
<form method="post" target="RunCode">
<tr><td height="45%">
<textarea rows="15" name="Code" style="width:100%;height:100%"></textarea>
</td></tr>
<tr><td align="center" height="30"><input type="submit" />
</td></tr></form>
<tr><td>
<iframe frameborder="0" width="100%" height="100%" name="RunCode"></iframe>
</td></tr></table>
<%}%></body></html>

 

补充:asp教程,ASP入门
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,