asp.net中的string.Format()

it2026-05-25  10

代码 string  message  =   " Alert! " ; string  toURL  =   " home.aspx " ; string  js  =   @" <script>alert('{0}'); window.location.href = '{1}'; </script> " ; if ( ! Page.ClientScript.IsStartupScriptRegistered( " alert " )){ Page.ClientScript.RegisterStartupScript(Page.GetType(),  " alert " string .Format(js, message, toURL));}

转载于:https://www.cnblogs.com/lfzwenzhu/archive/2010/07/02/1770011.html

最新回复(0)