<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1000" height="309" id="FlashID" title="iMathSmart">
<param name="movie" value="new_banner_animation_30_days_free_trial_ver_final_08_logo_border_01.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="11.0.0.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="new_banner_animation_30_days_free_trial_ver_final_08_logo_border_01.swf" width="1000" height="309">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="11.0.0.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="#" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
问问题
1947 次
2 回答
5
好像最新版的chrome 27.0.1453.94 m 不能显示多个flash项。在摆弄 Firebug 时,我想到了以下丑陋但有效的解决方案:
<script type="text/javascript">
$(document).ready(function(){
if(window.navigator.appVersion.match(/Chrome/)) {
jQuery('object').each(function() {
jQuery(this).css('display','block');
});
}
});
</script>
您只需要触发与对象的外观有关的某些事情即可开始渲染。(您也可以将对象替换为自身的克隆等...)。
于 2013-05-28T17:36:15.723 回答
0
没有 jQuery 也一样:
<script type="text/javascript">
if (window.navigator.appVersion.match(/Chrome/)) {
function chrome_flash_redraw() {
var objects = document.getElementsByTagName('object');
for (var i = 0, j = objects.length; i < j; i++) {
objects[i].style.display = 'block';
}
}
if (window.addEventListener) {
window.addEventListener('load', chrome_flash_redraw, false);
} else if (window.attachEvent) {
window.attachEvent('onload', chrome_flash_redraw);
}
}
</script>
只需将此代码放在页面中的任何位置即可。
于 2013-06-01T06:56:21.707 回答