运行代码 缩小
汉王
HTML代码
复制 格式化 注释 注释 清空
放大
AخA
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
<title>百度mp3调用</title>
6
</head>
7
<body>
8
<input id="songInfo" type="text" value="" style="width:288px; font-size:16px; height:20px; line-height:20px; vertical-align:middle" onkeydown="return SubmitKeyClick(this,event)"  />
9
<button id="playGo" style="height:26px; line-height:26px; padding:0 10px; font-size:14px; vertical-align:middle">百度播放</button>
10
<br/><br/>
11
<span id="songplay">挪威的森林,伍佰</span>
12
<script type="text/javascript">
13
<!--
14
function play(name,artist,auto){
15
    var qwert = '<div style="width:400px; height:77px; background:url([url]http://zzhie.sinaapp.com/code/img.gif[/url]) no-repeat;"><embed style="width:300px; height:48px; margin:0px; padding:0px; float:left;" src="http://box.baidu.com/widget/flash/mbsong.swf?name='+name+'&artist='+artist+'&autoPlay='+auto+'" width="310" height="51" allowscriptaccess="never" allownetworking="internal" type="application/x-shockwave-flash" /></div>';
CSS代码
复制 格式化 注释 注释 颜色 清空
放大
CSS代码...
x
 
1
JS代码
复制 格式化 注释 注释 清空
放大
JS代码...
xxxxxxxxxx
1
 
1
名称
JS单曲调用百度MP3音乐播放器
分类
网站常用
描述
在网上找的单曲调用百度mp3音乐播放器的代码,改了改,文本框输入歌曲名,中文逗号,歌手名,回车就可以试听了。几点说明: <br>  百度音乐api 音乐文件地址,span,p,div,等都可以,ID 必须是songplay; <br>  参数说明,第一个是歌曲...
收藏