JavaScript基础实例:如何计算24点(1)

 1<html>
 2<head>
 3<title>24点</title>
 4<meta content="[email protected]" name="author"/>
 5<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
 6</head>
 7<body>
 8<br/>   
 9计算24点(加、减、乘、除、括号) Javascript版 v1.0<br/><br/>   
10作者:<a href="mailto:[email protected]">[email protected]</a> (转贴请注明作者)<br/><br/>
11
12  
132004-04-26 <br/><br/><br/><br/>
14<form>   
15请输入四个数字(1-13):<br/><br/>
16<input name="fa" size="2" type="text"/>
17<input name="fb" size="2" type="text"/>
18<input name="fc" size="2" type="text"/>
19<input name="fd" size="2" type="text"/>
20<br/><br/><input name="btn" onclick="javascript:funCount()" type="button" value=" 计算 "/>
21</form>
22<br/><br/>
23<br/><br/>   
24一副牌(52张)中,任意抽取4张可有1820种不同组合,其中有458个牌组算不出24点。   
25<br/><br/>   
26二十世纪80年代中期,孙士杰从上海到美国定居。孙士杰有几位邻居是美国人。邻居家<br/>   
27的小孩到他家串门,他没有别的玩具供孩子们玩,就灵机一动,拿出一副扑克来教他们<br/>   
28玩“24点”。谁知,这一玩,竟令美国孩子着了迷。这些孩子又把这种游戏带回家中和<br/>   
29学校,人们发现这种游戏对开发智力十分有益,后来就在全美推广开了。   
30  
31<script language="JavaScript"></script></body></html>
Published At
Categories with 网页设计
comments powered by Disqus