How to implement the JavaScript script dynamically from the server to the page?

xiaoxiao2021-03-06  20

In the System.Web.ui.page class, it contains regionTERTARTUPScript () and registerclientscriptblock () two methods:

Page.RegisterStartupScript (key, script);

Page.RegisterClientScriptBlock (Key, Script);

Key is the unique identifier for generating a client script block, Script is a client script block that will be generated (string type)

The only difference between the two is different from the location: the former is generated at the end, and the latter is generated at the beginning.

转载请注明原文地址:https://www.9cbs.com/read-44594.html

New Post(0)