如何用js关掉网页背景音乐? 好象这样可以了javascript(close); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 只有document才有close()方法;用close岂不把窗口都关起来了。 <bgsound id=mymusic src="super.mp3" loop="-1"> <input type="button" value="stop" onclick="document.all.mymusic.src=''"> 楼上的大侠:问题稍微复杂一些:为了避免打开不同的页面,音乐重新开始播放,我使用了帧:---------index.htm--------------<frameset rows="99,1" frameborder="NO" border="0" framespacing="0"> <frame src="page1.htm" name="leftFrame"> <frame src="music.htm" name="mainFrame" id=mainframe> </frameset>-------------music.htm-----------......<bgsound id=mymusic src="super.mp3" loop="-1"> .......在page1中使用<input type="button" value="stop" onclick="document.all.mymusic.src=''">报document.all.mymusic为空或不是对象请问该如何解决? 也就是说javascript可不可以跨页面对标签进行控制阿? <input type="button" value="stop" onclick="top.mainframe.document.all.mymusic.src=''"> 如何阻止某个JS脚本执行。 关于连接的JS不工作的问题 在线编辑器怎么识别word图片 innerHTML中包含\,",不能解析问题 急求:一款好的web页面视频播放器 JavaScript中如何使用微软自带的控件? 如何用图片作一个提交按钮和检查用户按钮 关于多选框的问题 我的作品--推荐 关于打开一个文件的问题! 二个层,如何动态改变这二个层里所选文字的样式!?? onbeforeunload 问题
<input type="button" value="stop" onclick="document.all.mymusic.src=''">
问题稍微复杂一些:为了避免打开不同的页面,音乐重新开始播放,我使用了帧:---------index.htm--------------
<frameset rows="99,1" frameborder="NO" border="0" framespacing="0">
<frame src="page1.htm" name="leftFrame"> <frame src="music.htm" name="mainFrame" id=mainframe>
</frameset>-------------music.htm-----------
......
<bgsound id=mymusic src="super.mp3" loop="-1">
.......
在page1中使用
<input type="button" value="stop" onclick="document.all.mymusic.src=''">
报document.all.mymusic为空或不是对象请问该如何解决?