1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Test</title>
<script type="text/javascript">
function InitPlayer(){
var player=document.getElementById('player');
var html ='<object...> <param...> ... <\/object>'; // Ici, la balise object et/ou embed
player.innerHTML=html;
}
function addLoadListener(func){
if(typeof window.onload!='function')
window.onload=func;
else{
var oldonload=window.onload;
window.onload=function(){oldonload();func();}
}
}
addLoadListener(InitPlayer);
</script>
</head>
<body>
<div id="player">
<!-- Ici sera affiché le player -->
</div>
</body>
</html> |
Partager