为我的日志添加个性化背景音乐
演示地址 :
http://leshui.clwind.com/article.asp?id=46
呵呵此方法是刚才写日志的时候突然想到的:
http://leshui.clwind.com/article.asp?id=57
方法很简单
1,首先找到blog下面article.asp页面
2,打开文件在源代码最后加入以下代码即可
<%
if request("id")=46 then
response.write("<bgsound src=mp3/qtbhl.mp3 loop=-1></bgsound>")
end if
%>
3,我们还是解释一下这段代码吧
request("id") 读取article.asp页面传递id
if request("id")=46 then 如果页面传递过来的id等于46,我们就在此页面输出HTML背景音乐代码 response.write("<bgsound src=mp3/qtbhl.mp3 loop=-1></bgsound>")
哈哈,够简单吧,id可以更具自己需要修改。
如果需要多个日志都有不同的背景音乐,就将上面的if......end if 复制几个,然后改相应的id就OK了
注意:src=mp3/qtbhl.mp3中等号后面的则是你的背景音乐地址了。
给大家举个多个日志不同的背景音乐的例子吧,怕一些朋友不懂代码,呵呵
假如,你有4个日志,id分别为1,2,3,4
那么代码应该是:
<%
if request("id")=1 then
response.write("<bgsound src=mp3/qtbhl.mp3 loop=-1></bgsound>")
end if
if request("id")=2 then
response.write("<bgsound src=mp3/qtbhl.mp3 loop=-1></bgsound>")
end if
if request("id")=3 then
response.write("<bgsound src=mp3/qtbhl.mp3 loop=-1></bgsound>")
end if
if request("id")=4 then
response.write("<bgsound src=mp3/qtbhl.mp3 loop=-1></bgsound>")
end if
%>
[
本帖最后由 new_boy 于 2007-2-11 00:07 编辑 ]