日期:2014-03-08  浏览次数:20912 次

javascript+xml制造的随机抽奖程序源代码

以下index.html源代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
*{font-size: 14px;}
#container{width: 800px; margin: 0 auto; margin-top: 10px; padding: 10px 0 5px 30px;}
.num{width: 830px; margin: 0 auto;}
h2{margin: 3px;}
strong{color: red;}
#result{width: 600px; margin: 0 auto; margin-top: 10px;}
.info{width: 200px; height: 120px; line-height: 15px; float: left;}
h3{text-align: center;}
.clear{clear: both;}
#but{ width: 100px; position: fixed; right: 8px; top: 30px; margin: 10px auto;}
* html, * html body , * html #wrapper, * html #content{margin: 0; padding: 0; height: 100%; width: 100%; overflow: hidden;}
* html #content{overflow: auto; width: auto;}
* html #but{position: absolute;}
.details{border-collapse: collapse;  margin: 10px auto; background: url(but.png) no-repeat;}
.details td{padding: 5px;}
.bh{width: 86px; text-align: center; height: 84px;}
.bm{width: 100px; text-align: center;}
.mz{width: 150px; text-align: center;}
</style>
</head>
<body>
<div id="wrap">
    <div id="content">
        <div id="result">
        </div>
        <div class="clear"></div>
        <div class="num">参与人数:<strong id="num"></strong>人</div>
        <div id="container">
              <div id="show">
                  <div id="first"></div>
                  <div id="second"></div>
                  <div id="third"></div>
                  <div id="fourth"></div>
                  <div id="fifth"></div>