如果浏览器是 internet eplorer,我想用代码将 flash 对象移到右列旁边,document.getElementById("flashobj").style.left = "260px";
但它不起作用。我无法理解这个问题。
提前致谢。
<div id="flashobj">You need Flash player 10+ and JavaScript enabled to view this video.</div>
<div id="banner">
</div>
<form id="combination" action="index.php" method="get" name="combination" target="_self">
<div class="FixedHeightContainer">
<div class="TContent">
<input type="hidden" name="view" value="" />
</div>
</div>
</form>
<script type="text/javascript">
navigator.sayswho= (function(){
var N= navigator.appName, ua= navigator.userAgent, tem;
var M= ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];
M= M? [M[1], M[2]]: [N, navigator.appVersion,'-?'];
return M;
})();
var browser=navigator.sayswho;
if(browser[0] == 'MSIE')
{
document.getElementById("flashobj").style.left = "260px";
}
swfobject.addLoadEvent( ytplayer_render_player );
function ytplayer_render_player( )
{
var so = swfobject.embedSWF
(
'http://www.youtube.com/apiplayer?video_id=_vx1OVLX5Rc&enablejsapi=1&autoplay=1&loop=1&version=3&rel=0&fs=1&playerapiid=ytplayer',
'flashobj',
600,
400,
'10',
null,
null,
{
allowScriptAccess: 'always',
allowFullScreen: 'true'
},
{
id: 'flashobj'
}
);
}