惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
C
Check Point Blog
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
SecWiki News
SecWiki News
有赞技术团队
有赞技术团队
Latest news
Latest news
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
Project Zero
Project Zero
H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Engineering at Meta
Engineering at Meta
T
Threat Research - Cisco Blogs
腾讯CDC
P
Proofpoint News Feed
L
LINUX DO - 热门话题
C
Cisco Blogs
P
Palo Alto Networks Blog
Vercel News
Vercel News
P
Privacy International News Feed
爱范儿
爱范儿
Scott Helme
Scott Helme
L
Lohrmann on Cybersecurity
MyScale Blog
MyScale Blog
K
Kaspersky official blog
B
Blog RSS Feed
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
O
OpenAI News
博客园 - 叶小钗
量子位
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
J
Java Code Geeks
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LINUX DO - 最新话题
F
Fortinet All Blogs
N
News | PayPal Newsroom
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 【当耐特】
N
News and Events Feed by Topic
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
Last Week in AI
Last Week in AI

博客园 - asdsd

js收藏 - asdsd - 博客园 ArrayList最佳使用建议 右下角弹出消息 用js限制用户输入字节个数 - asdsd - 博客园 数据岛与分页 滚动条的设置 SQL中CONVERT转化函数的用法 js实现自动全屏幕 - asdsd - 博客园 迅速返回页面顶部代码 - asdsd - 博客园 图示元素的clientTop、offsetTop、offsetHeight等属性 新浪天气-模拟 揭开正则表达式 javascript中获取radiobuttonlist选中值 开发时碰到的问题以及心得经验 经常用到的javaScript技术 一劳永逸 让你与IE弹出窗口彻底告别 判断一个对象是否存在 用C#制作新闻阅读器(电脑报2005年3月14日 第10期) 遮挡的问题
随机排1-100数字
asdsd · 2006-10-27 · via 博客园 - asdsd

<html>
<head>
    
<title>JavaScript Shuffle Arithmetic</title>
    
<meta name="author" content="" />
</head>
<body>
    
<script language="javascript">
var sequence 
= new Array(100);
for ( var i=0 ; i < 100 ; i++ )
{
    aa[i] 
= i+1;
}

alert(aa(sequence));

function aa(ary)
{
    
for ( var i=ary.length-1 ; i >= 0 ; i-- )
    
{
         var v 
= parseInt(Math.random()*(i+1));
         var tmp 
= ary[v];
         ary[v] 
= ary[i];
         ary[i] 
= tmp;   
    }

    
return ary; 
}

</script>
</body>
</html>

posted on 2006-10-27 13:14  asdsd  阅读(372)  评论(0)    收藏  举报

刷新页面返回顶部