reset and begin
7/06/2009

using code javascript play music on FF và IE

<pre>function loadnhac(obj) { var flash; var media=document.getElementById('media'); var browser=navigator.appName; if(browser=="Microsoft Internet Explorer") { flash = '<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">'; //kiem tra trinh duyet

flash += '<param name="src" value="' + obj+ '">'; flash += '<param name="autoStart" value="True"></object>'; media.innerHTML = flash; } else{ flash = '<embed type="video/x-ms-wmv" heigth="300px" width="230px" wmode="tranparent" src="' +obj + '"></embed>'; media.innerHTML = flash; }


<div id="media">

</div>

<a onclick="loadnhac('a.mp3')">bai 1</a>

<a onclick="loadnhac('b.mp3')">bai 2</a>

truyen tham so

</pre>


Bloger Comments
G+ Comments
Comments FaceBook

No comments:

List

Profiles Information


About me : Nothing is 1 vài thứ - 1985

Places I've Lived : I Hà Nội

Home Page : http://www.shimivn.blogspot.com/

Think : 1:1000000000

Languages spoken : Vietnamese,English.

Mobile : sony C2305

dell : i3-Ram 3GB- HDD 250GB .