ASP Clear 方法


Clear 方法清空任何已缓冲的 HTML 输出。

注意:此方法无法清除响应的头部,只能清空响应的正文。

注意:假如 response.Buffer 为 false,那么此方法会引起一个 run-time 错误。

语法

  1. response.Clear

实例

  1. <%
    response.Buffer=true
    %>
    <html>
    <body>
    <p>This is some text I want to send to the user.</p>
    <p>No, I changed my mind. I want to clear the text.</p>
    <%
    response.Clear
    %>
    </body>
    </html>

    输出:

    (nothing)