日期:2014-05-18 浏览次数:20519 次
protected void page_load()
{
   regrandom();
}
protected void regrandom()
        {
            Page.ClientScript.RegisterStartupScript(typeof(string), "random", "function JSRanDom(){return Math.random();}", true);
        }
下面的也可以
Response.Write("<script>function JSRanDom(){return Math.random();}</script>")