Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
chả là em thấy thằng bạn nó có cái code muốn nghe media của bài nào thì nhấn vào :"mở media" v.v... sau khi nhấn vào thì cái media mở ra cùng 1 bài hát, pác nào bít code dạng vật thì cho em với, em xin thằng bạn mà nó keo wá nên ko cho. ráng hix hix giúp dùm em nha

em cần code html. Pác cần mô tả, đó là 1 cái mwdia nhung nó ẩn sau 1 hàng chữ, ví dụ như " bấm vào đây để mở...", sau khi bấm vào thì từ hàng chữ, nó chạy xuống 1 cái mwdia có bài nhạc dc cài sẵn, vậy thôi ạ(lưu ý là nó ko nhảy wa 1 trang khác), vậy đoá, ráng giúp dùm em...:)Tất cả những code music đều có thể làm được như vậy ! Bạn chỉ cần nói là cần code music dạng HTML hay PHP thôi :![]()
Mà nghe bạn tả mình vẫn ko hình dung rõ cụ thể cái code mà bạn của bạn có như thế nào![]()
pác ơi, cái này là để làm code nhạc màUhm , mỗi loại code music có đặc tính riêng , bảo mình tìm chính xác thì hơi khó , nhưng mình có 1 code music có thể xài được , bạn down về nghiên cứu thử (sưu tầm)
Link down nè
. Em cần một code mwdia = html có thể đóng mở để em có thể để gọn trên web. Ví dụ như "bấm vào đây để nghe nhạc". Sau khi mình bấm vào đó thì lập tức xuất hiện mwdia và bài nhạc được phát. pác cho em code khác dc ko? Cố giúp dùm em nha::)
ok, đây là web của bạn em http://nhut.de ,nhưng cái này nó làm = php, còn em thì chỉ muốn html thôi, nếu pác có thì cho em nhéUhm , bạn ko cần code music , cũng ko cần code nghe nhạc , thế cụ thể code của bạn ra sao ? Bạn có thể cho mình trang Web của bạn bạn làm ví dụ được ko ? Mình cần xem cụ thể code đó ra sao ! :![]()
http://nhut.de/images/js/common.js
<html>
<head>
<script language="javascript>
//Media Link
function playmedia(strID,strType,strURL,intWidth,intHeight) {
var objDiv=document.getElementById(strID);
if (!objDiv) return false;
if (objDiv.style.display!='none') {
objDiv.innerHTML='';
objDiv.style.display='none';
} else {
objDiv.innerHTML=makemedia(strType,strURL,intWidth,intHeight);
objDiv.style.display='block';
}
}
//Media Build
function makemedia (strType,strURL,intWidth,intHeight) {
var strHtml;
switch(strType) {
case 'wmp':
strHtml="<object width='"+intWidth+"' height='"+intHeight+"' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'><param name='url' value='"+strURL+"'/><embed width='"+intWidth+"' height='"+intHeight+"' type='application/x-mplayer2' src='"+strURL+"'></embed></object>";
break;
case 'swf':
strHtml="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='"+intWidth+"' height='"+intHeight+"'><param name='movie' value='"+strURL+"'/><param name='quality' value='high' /><embed src='"+strURL+"' quality='high' type='application/x-shockwave-flash' width='"+intWidth+"' height='"+intHeight+"'></embed></object>";
break;
case 'flv':
strHtml="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+intWidth+"' height='"+(parseInt(intHeight)+20)+"' id='FLVPlayer'><param name='movie' value='images/others/flv.swf?autostart=true&repeat=false&file="+strURL+"' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='images/others/flv.swf?autostart=true&repeat=false&file="+strURL+"' quality='high' type='application/x-shockwave-flash' width='"+intWidth+"' height='"+(parseInt(intHeight)+20)+"' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent'></embed></object>";
break;
case 'real':
strHtml="<object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width='"+intWidth+"' height='"+intHeight+"'><param name='src' value='"+absbaseurl+"inc/realplay.php?link="+strURL+"' /><param name='controls' value='Imagewindow' /><param name='console' value='clip1' /><param name='autostart' value='true' /><embed src='"+absbaseurl+"inc/realplay.php?link="+strURL+"' type='audio/x-pn-realaudio-plugin' autostart='true' console='clip1' controls='Imagewindow' width='"+intWidth+"' height='"+intHeight+"'></embed></object><br/><object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width='"+intWidth+"' height='44'><param name='src' value='"+absbaseurl+"inc/realplay.php?link="+strURL+"' /><param name='controls' value='ControlPanel' /><param name='console' value='clip1' /><param name='autostart' value='true' /><embed src='"+absbaseurl+"inc/realplay.php?link="+strURL+"' type='audio/x-pn-realaudio-plugin' autostart='true' console='clip1' controls='ControlPanel' width='"+intWidth+"' height='44'></embed></object>";
break;
}
return strHtml;
}
</script>
</head>
<body>
<div id="media1></div>
<a href="javascript:void(0)" onclick="playmedia('media1', 'wmp', 'http://www30.websamba.com/DoanDuy8x/Thienduongvangem-dangkhoi.wma', '400', '300');">Open/Close Media</a>
</body>
</html>
thanks pác nhìu nhé:hug:.....................................................sặc, pó tay bạn luôn. Thử cái này xem:
Trong function playmedia có 5 đối số lần lượt là ID của Element (trong trường hợp trên là tag div có ID là media1), loại chương trình để chơi file media (thằng bạn của bạn đã thiết lập gồm 5 loại: wmp, swf, flv, real), địa chỉ media, chiều rộng, chiều cao.Mã:<html> <head> <script language="javascript> //Media Link function playmedia(strID,strType,strURL,intWidth,intHeight) { var objDiv=document.getElementById(strID); if (!objDiv) return false; if (objDiv.style.display!='none') { objDiv.innerHTML=''; objDiv.style.display='none'; } else { objDiv.innerHTML=makemedia(strType,strURL,intWidth,intHeight); objDiv.style.display='block'; } } //Media Build function makemedia (strType,strURL,intWidth,intHeight) { var strHtml; switch(strType) { case 'wmp': strHtml="<object width='"+intWidth+"' height='"+intHeight+"' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'><param name='url' value='"+strURL+"'/><embed width='"+intWidth+"' height='"+intHeight+"' type='application/x-mplayer2' src='"+strURL+"'></embed></object>"; break; case 'swf': strHtml="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='"+intWidth+"' height='"+intHeight+"'><param name='movie' value='"+strURL+"'/><param name='quality' value='high' /><embed src='"+strURL+"' quality='high' type='application/x-shockwave-flash' width='"+intWidth+"' height='"+intHeight+"'></embed></object>"; break; case 'flv': strHtml="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+intWidth+"' height='"+(parseInt(intHeight)+20)+"' id='FLVPlayer'><param name='movie' value='images/others/flv.swf?autostart=true&repeat=false&file="+strURL+"' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='images/others/flv.swf?autostart=true&repeat=false&file="+strURL+"' quality='high' type='application/x-shockwave-flash' width='"+intWidth+"' height='"+(parseInt(intHeight)+20)+"' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent'></embed></object>"; break; case 'real': strHtml="<object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width='"+intWidth+"' height='"+intHeight+"'><param name='src' value='"+absbaseurl+"inc/realplay.php?link="+strURL+"' /><param name='controls' value='Imagewindow' /><param name='console' value='clip1' /><param name='autostart' value='true' /><embed src='"+absbaseurl+"inc/realplay.php?link="+strURL+"' type='audio/x-pn-realaudio-plugin' autostart='true' console='clip1' controls='Imagewindow' width='"+intWidth+"' height='"+intHeight+"'></embed></object><br/><object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width='"+intWidth+"' height='44'><param name='src' value='"+absbaseurl+"inc/realplay.php?link="+strURL+"' /><param name='controls' value='ControlPanel' /><param name='console' value='clip1' /><param name='autostart' value='true' /><embed src='"+absbaseurl+"inc/realplay.php?link="+strURL+"' type='audio/x-pn-realaudio-plugin' autostart='true' console='clip1' controls='ControlPanel' width='"+intWidth+"' height='44'></embed></object>"; break; } return strHtml; } </script> </head> <body> <div id="media1></div> <a href="javascript:void(0)" onclick="playmedia('media1', 'wmp', 'http://www30.websamba.com/DoanDuy8x/Thienduongvangem-dangkhoi.wma', '400', '300');">Open/Close Media</a> </body> </html>
Chỉ đơn giản vậy thôi.