日期:2014-05-18  浏览次数:20407 次

如何实现随机数脚本语言用c#
如何实现随机数脚本语言用c#

------解决方案--------------------
http://blog.csdn.net/holym/archive/2006/05/16/741074.aspx

http://www.cnblogs.com/virusswb/articles/1238807.html
------解决方案--------------------
你是说用C#
生成一段js获取随机数的代码??
如果是可以这样
C# code

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>")