请教高手。
我在网上下载一个网页闹钟源码? 在Dreamweaver里 可以正想运行,也有音乐文件! 但没有声音,怎样才能插入声音。
我是初学者.... 懂的帮帮忙!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>162100闹钟</title>
<style type="text/css">
<!--
html { margin:0; padding:0; border:none; text-align:center; }
body { margin:0; margin-top:5px; margin-left:auto; margin-right:auto; padding:0; width:300px; height:400px; text-align:left; background-color:#ECF7FF; position:relative; top:0; left:0; }
body, td, p { font-size:12px; }
a { color:#0E6DBC; }
h3 { margin:0; margin-top:8px; }
p { margin:0; line-height:150%; }
form { margin:0; padding:0; }
#body { padding:6px; border-left:1px #327CBD solid; border-right:1px #327CBD solid; clear:both;}
#nowclock { overflow:hidden; margin-bottom:6px; padding:5px; text-align:center; clear:both; }
.title { margin-top:6px; height:36px; }
#title { background-color:#FFFFFF; font-weight:bold; border:1px #AFD2F0 solid; border-bottom:none; cursor:pointer; }
.title_ { border-bottom:1px #AFD2F0 solid; cursor:pointer; }
#table { height:150px; border:1px #AFD2F0 solid; border-top:none; padding-top:10px; padding-bottom:8px; background-color:#FFFFFF; clear:both; }
.point { color:#0E6DBC; }
.red { color:#FF5500; }
.is { margin:0; height:4px; font-weight:bold; text-align:center; font-size:1px; position:relative; clear:both; }
.i1 { height:1px; width:292px; margin-left:4px; margin-right:4px; font-size:1px; background-color:#327CBD; overflow:hidden; }
.i2 { height:1px; width:292px; margin-left:2px; margin-right:2px; font-size:1px; border-left:2px #327CBD solid; border-right:2px #327CBD solid; overflow:hidden; }
.i3 { height:2px; width:296px; margin-left:1px; margin-right:1px; font-size:1px; border-left:1px #327CBD solid; border-right:1px #327CBD solid; overflow:hidden; }
.i5 { position:absolute; top:2px; left:2px; width:290px; padding-left:6px; height:24px; line-height:24px; background-color:#499CE2; z-index:12; color:#FFFFFF; overflow:hidden; font-size:12px; }
-->
</style>
</head>
<body>
<div style="width:0px;height:0px;overflow:hidden;">
<iframe id="tryMusicFr" name="tryMusicFr"></iframe>
<iframe id="clock1Fr" name="clock1Fr"></iframe>
<iframe id="clock2Fr" name="clock2Fr"></iframe>
<iframe id="clock3Fr" name="clock3Fr"></iframe>
</div>
<div class="is">
<div class="i1"></div>
<div class="i2"></div>
<div class="i3"></div>
<div class="i5">闹钟提醒</div>
</div>
<div id="body">
<div style="height:24px;"> </div>
<div id="nowclock">当前时间:<font id="clock" face="Arial" color="#000080" size="4" align="center">2010年01月01日 00时00分00秒</font></div>
<form action="setclock.php" method="get" onsubmit="return post(this)">
<input type="hidden" id="time" name="time" value="" />
<input type="hidden" id="clock123" name="clock123" value="1" />
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="title">
<tr>
<td align="center" class="title_" onclick="xuan(this,1)" id="title">闹钟1<br />
<span id="clock1ye" class="red"></span><span id="clock1no" onclick="del(1)"></span></td>
<td align="center" class="title_" onclick="xuan(this,2)">闹钟2<br />
<span id="clock2ye" class="red"></span><span id="clock2no" onclick="del(2)"></span></td>
<td align="center" class="title_" onclick="xuan(this,3)">闹钟3<br />
<span id="clock3ye" class="red"></span><span id="clock3no" onclick="del(3)"></span></td>
</tr>
</table>
<div id="table">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="84" align="center">提醒时间:</td>
<td><label>
<select name="h" id="h">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
</label>
时
<label>
<select name="m" id="m">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>
</label>
分 </td>
</tr>
<tr>
<td width="84" align="center">闹钟铃声:</td>
<td><label>
<select name="mid" id="mid">
<option value='1'>梁山伯与祝英台</option>
<option value='2'>风中有朵雨做的云</option>
<option value='3'>四季之春天</option>
<option value='4'>江南春早</option>
<option value='5'>秋天不回来</option>
<option value='6'>该死的温柔</option>
<option value='7'>菊花台</option>
<option value='8'>童话</option>
<option value='9'>夜曲</option>
<option value='10'>土耳其进行曲</option>
<option value='11'>致爱丽丝</option>
<option value='12'>爱的罗曼史</option>
<option value='13'>莫斯科郊外的晚上</option>
<option value='14'>泰坦尼克号</option>
<option value='15'>雨中旋律</option>
</select>
<input name="button" type="button" onclick="tryM(this)" value="试听" />
</label></td>
</tr>
<tr>
<td width="84" align="center">提示文字:</td>
<td><input type="text" name="text" maxlength="40" value="休息,休息一下吧!" />
</td>
</tr>
<tr>
<td width="84" align="center">重复提醒:</td>
<td><label for="repeat1">
<input type="radio" name="repeat" id="repeat1" value="1" checked="checked" />
不重复</label>
<label for="repeat2">
<input type="radio" name="repeat" id="repeat2" value="2" />
每天提醒</label></td>
</tr>
<tr>
<td width="84" align="center"> </td>
<td><input name="submit" type="submit" value="开 启 定 时 闹 钟" /></td>
</tr>
</table>
</div>
</form>
<div class="point">
<h3>162100提示:</h3>
<p>·如果关闭页面,闹钟将无法响铃。</p>
<p>·再次打开页面,先前设定的闹钟仍然生效。</p>
<p>·需要打开音响或佩戴耳机,以便听到提示铃声。</p>
<p>·闹钟以您电脑时间为准,请先校对好本机时间。</p>
</div>
</div>
<div class="is">
<div class="i3"></div>
<div class="i2"></div>
<div class="i1"></div>
</div>
<script type="text/javascript">
<!--
var cookieEnabled=(typeof navigator.cookieEnabled!='undefined' && navigator.cookieEnabled)?true:false;
function setCookie(name,value,time){
if(cookieEnabled==false){ alert('您的浏览器未开通cookie,执行失败!'); return false; }
if(!time || isNaN(time)) time=365; //此 cookie 将被保存 365 天
var expires=new Date(); //new Date("December 31, 9998");
expires.setTime(expires.getTime()+time*24*60*60*1000);
var cookieStr=encodeURIComponent(value);
if(cookieStr.length>3072){ //alert('所设置的cookie数据太大,系统将自动缩减');
cookieStr=cookieStr.substring(0,3072).replace(/[\|\s]+$/,'');
}
document.cookie=name+'='+cookieStr+';expires='+expires.toGMTString()+';path=/;';
}
function getCookie(name){
var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr!=null && arr!=false) return decodeURIComponent(arr[2]); return false;
}
function tick(){
var date=new Date()
window.setTimeout("tick()",1000);
document.getElementById('clock').innerHTML=date.toLocaleString();
}
window.onload=function(){
tick();
var base=new Date();
var time=base.getTime()+10*60*1000;
var date=new Date(time);
document.getElementById('h').value=date.getHours();
document.getElementById('m').value=date.getMinutes();
var overSetClock=new Array();
for(var i=1; i<=3; i++){
var reg=null;
//document.write(document.cookie)
if(overSetClock[i]=getCookie('cookieColok'+i+'')){
if(reg=overSetClock[i].match(/repeat=(\d+).*&time=(\d+):(\d+)/)){
if(parseFloat(reg[2])>parseFloat(base.getHours()) || (parseFloat(reg[2])==parseFloat(base.getHours()) && parseFloat(reg[3])>parseFloat(base.getMinutes())) || parseFloat(reg[1])!=1){
document.getElementById('clock'+i+'Fr').src=overSetClock[i];
document.getElementById('clock'+i+'ye').innerHTML=''+reg[2]+':'+reg[3]+''+(parseFloat(reg[1])!=1?'重复':'一次')+'√';
document.getElementById('clock'+i+'ye').title="闹钟"+i+"已设定。\n时间:"+reg[2]+":"+reg[3]+","+(parseFloat(reg[1])!=1?"每天重复":"不重复")+"";
document.getElementById('clock'+i+'no').innerHTML='×';
document.getElementById('clock'+i+'no').title='关闭闹钟'+i+'';
}
}
}
}
}
function xuan(obj,n){
document.getElementById('title').id=null;
obj.id='title';
document.getElementById('clock123').value=n;
}
function tryM(obj){
if(obj.value=='试听'){
document.getElementById('tryMusicFr').src='trymusic.php?mid='+document.getElementById('mid').value+'';
obj.value='关闭';
}else{
document.getElementById('tryMusicFr').src='about:blank';
obj.value='试听';
}
}
function post(form){
if(form.clock123.value!=1 && form.clock123.value!=2 && form.clock123.value!=3){
form.clock123.value=1;
}
if(document.getElementById('clock'+form.clock123.value+'ye').innerHTML!=''){
if(!confirm('闹钟'+form.clock123.value+'已设定,再次设定将覆盖上一个')){
return false;
}
}
form.target='clock'+form.clock123.value+'Fr';
var h=document.getElementById('h').value; //parseFloat()
var m=document.getElementById('m').value;
function getR(form){
for(var i=0;i<form.repeat.length;i++){
if(form.repeat[i].checked){
return form.repeat[i].value;
}
}
}
var r=getR(form);
document.getElementById('clock'+form.clock123.value+'ye').innerHTML=''+h+':'+m+''+(r!=1?'重复':'一次')+'√';
document.getElementById('clock'+form.clock123.value+'ye').title="闹钟"+form.clock123.value+"已设定。\n时间:"+h+":"+m+","+(r!=1?"每天重复":"不重复")+"";
document.getElementById('clock'+form.clock123.value+'no').innerHTML='×';
document.getElementById('clock'+form.clock123.value+'no').title='关闭闹钟'+form.clock123.value+'';
form.time.value=h+':'+m;
alert('闹钟'+form.clock123.value+'已设定好!');
return true;
}
function del(n){
if(confirm('确定关闭闹钟'+n+'么?')){
setCookie('cookieColok'+n+'','',0);
document.getElementById('clock'+n+'Fr').src='about:blank';
document.getElementById('clock'+n+'ye').innerHTML='';
document.getElementById('clock'+n+'ye').title='';
document.getElementById('clock'+n+'no').innerHTML='';
document.getElementById('clock'+n+'no').title='';
}
}
-->
</script>
</body>
</html>
function tryM(obj){
if(obj.value=='试听'){
document.getElementById('tryMusicFr').src='trymusic.php?mid='+document.getElementById('mid').value+'';
obj.value='关闭';
}else{
document.getElementById('tryMusicFr').src='about:blank';
obj.value='试听';
}
}
这是试听的那个代码,可以看出来,音乐是通过这个php文件进行的,所以提醒也应该是这个,你的机器上如果没有这个文件就不成了,或者变通一下,不使用这个php文件,而改为直接播放