在页面上放一个lable1,
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
//播放声音
string lj = "";
lj = Server.MapPath("//images/" + "闪亮天使.mp3");//获得音乐路径
lable1.Text = "<bgsound runat=server src='" + lj + "' loop='-1' />";//播放
}
}
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
//播放声音
string lj = "";
lj = Server.MapPath("//images/" + "闪亮天使.mp3");//获得音乐路径
lable1.Text = "<bgsound runat=server src='" + lj + "' loop='-1' />";//播放
}
}