Dream Tech Blog

A person with no dream in life can never live a happy life.
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

[vb]輸出Script到客戶端的四種方法.

Posted on 2004-02-03 13:21  Dream  阅读(664)  评论(0编辑  收藏  举报

        Response.Write("<script>alert('First')</script>")

        If IsClientScriptBlockRegistered("Test") = False Then
            RegisterClientScriptBlock("Test", "<script>alert('Second')</script>")
        End If

        If IsStartupScriptRegistered("Test2") = False Then
            RegisterStartupScript("Test2", "<script>alert('Third')</script>")
        End If

        Literal1.Text = "<script>alert('AnyWhere')</script>"