百度播放器调用
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <div style="border: 1px solid #DEDEDE; margin: 10px 0px; padding: 5px; height: 150px; font-size: 12px; text-align: center;"> <div style="text-align: center; width: 500px;overflow:hidden;"> <div id="d2" style="padding-top: 10px;"> <form action="#" name="myform"> 歌名:<input type="text" name="name" /> 演唱者:<input type="text" name="artist" /> <input style="padding:2px 5px; font-size: 12px; border: 1px #1E7ACE solid; background: #D0F0FF;" id="but" type="button" value="点击播放" /></form> </div> <div id="d1" style="padding-top: 10px;"> <div>这个是调用百度播放器,输入歌曲和演唱者后,点击播放就可以了</div> <div>播放器里面的链接地址可以直接点击右键另存为下载</div> </div> <script> function musictip(){ var name=document.myform.name.value; var artist=document.myform.artist.value; document.getElementById ("d1").style.display=""; document.getElementById ("d2").style.display=""; document.getElementById ("d1").innerHTML="< \object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' width=\'400\' height=\'95\' ><param name=\'movie\' value=\'http:\/\/box.baidu.com\/widget\/flash\/mbsong.swf?name="+name+"&artist="+artist+"\'>< \/param></param><param name=\'wmode\' value=\'opaque\'>< \/param></param><param name=\'allowscriptaccess\' value=\'always\'>< \/param><embed src=\'http:\/\/box.baidu.com\/widget\/flash\/mbsong.swf?name="+name+"&artist="+artist+"\' type=\'application\/x-shockwave-flash\' wmode=\'opaque\' allowscriptaccess=\'always\' width=\'400\' height=\'95\' >< \/embed>< \/object>" } document.getElementById("but").onclick = musictip; </embed></param></script> </div> </div> |