如果您在页面中使用 Response. write
, 您将会将代码置于 HTML 文档本身之前。 这意味着它将在 jQuery 或任何插件被装入之前运行 。 (此外, 它还可能导致该页面以 quirks 模式生成, 这可能会破坏整个布局 。 )
Protected Sub SqlDataSource1_Deleted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles SqlDataSource1.Deleted
Page.ClientScript.RegisterStartupScript(Page.GetType(), "notification", "showNotification({message: This is a sample Success notification , type: success });", true)
End Sub