1、jquery代码:

  1.1问题的版本:

$(function() {
haituheight();
$(window).resize(function(){
haituheight();
});
}); //改变高度和宽度的方法
function haituheight() {
var height = $(window).height()-$('.footer').height()-$('.header').height();
var width = $(window).width()-$(".main-left").width();
$("#FlexManyShips").css({"width":width,"height":height}); }

  1.2 解决之后的版本:

$(function() {
var resize_window_height = $(window).height()-$('.footer').height()-$('.header').height();
var resize_window_width = $(window).width()-$(".main-left").width()-1;
haituheight(resize_window_height,resize_window_width);
$(window).resize(function(){
resize_window_height = $(window).height()-$('.footer').height()-$('.header').height();
resize_window_width = $(window).width()-$(".main-left").width()-1;
haituheight(resize_window_height,resize_window_width);
});
}); //改变高度和宽度的方法
function haituheight(haituhigh,width) { if (navigator.appName.indexOf("Microsoft") != -1) {
var UA = navigator.userAgent;
var is360se = UA.toLowerCase().indexOf('360se') > -1 ? true : false;//360浏览器
if(!is360se) {
document.getElementById("FlexManyShips_ie").style.height=haituhigh+ "px";
document.getElementById("FlexManyShips_ie").style.width=width+ "px";
} else {
document.getElementById("FlexManyShips_ie").height = haituhigh+ "px";
          document.getElementById("FlexManyShips_ie").width = width+ "px";
}
} else {
        document.getElementById("FlexManyShips").style.height = haituhigh + "px";
        document.getElementById("FlexManyShips").style.width = width + "px";
}
}

  1.3 html代码:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="100%" height="100%" title="CJonline" id="FlexManyShips_ie"
name="FlexManyShips_ie">
<param name="src" value="flash/FlexManyShips.swf">
<param name="wmode" value="opaque">
<embed name="FlexManyShips" id="FlexManyShips" src="flash/FlexManyShips.swf"
quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="100%" height="100%" >
<param name="wmode" value="opaque">
</embed>
</object>

最新文章

  1. &quot;org.jboss.netty.internal.LoggerConfigurator&quot;.DESCRIBED is already registered 的解决办法
  2. Eclipse-导入maven项目
  3. Parallel.ForEach() 并行循环
  4. 互联网挣钱info
  5. c# linq 基础知识点
  6. 在IAR下移植CC2650 contiki工程
  7. python全栈开发day118-Mui
  8. 性能测试 基于Python结合InfluxDB及Grafana图表实时采集Linux多主机性能数据
  9. javafx安装
  10. Installation failed with message Failed to finalize session: INSTALL_FAILED_TEST_ONLY:installPackageLI.
  11. oracle查询视图归属于哪个用户
  12. DevExpress控件使用方法:第二篇 barManager
  13. Java系列: 如何在Eclipse中安装Memory Analyzer插件
  14. 服务不支持chkconfig的解决
  15. stringBuild置空方法
  16. PHP生成GIF动态图片验证码
  17. TFS 切换登录用户的方法[转]
  18. [NC13A]反蝴蝶效应/[SPOJ-NPC2014D]General Joke
  19. npm安装及webpack打包小demo
  20. 搭建git服务器(临时服务器,命令行形式,针对2到5人左右,轻量)

热门文章

  1. STL:set用法总结
  2. unity的assetbundle的自动命名,以我的命名lua为例
  3. nyoj 269——VF——————【dp】
  4. Java Collection.Set
  5. [转]Asp.net MVC中的ViewData与ViewBag
  6. ADO.NET教程(2)实现增删查改
  7. js中的Function和Object
  8. 互联网轻量级框架SSM-查缺补漏第一天
  9. PAT 1059. Prime Factors
  10. django内置组件——ContentTypes