Javascript IE8显示图像,Chrome/Firefox不使用BlockUI显示图像

Javascript IE8显示图像,Chrome/Firefox不使用BlockUI显示图像,javascript,jquery,html,asp.net,blockui,Javascript,Jquery,Html,Asp.net,Blockui,IE8显示图像,Chrome/Firefox不使用BlockUI显示图像 我的代码是: <link href="css/jquery-ui.css" rel="stylesheet" /> <script src="js/jquery-1.8.0.js"></script> <script src="js/jquery.blockUI.js"></script> <script type="text/javascript">

IE8显示图像,Chrome/Firefox不使用BlockUI显示图像

我的代码是:

<link href="css/jquery-ui.css" rel="stylesheet" />
<script src="js/jquery-1.8.0.js"></script>
<script src="js/jquery.blockUI.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#btnSubmit').click(function () {
            $.blockUI({ 
                theme: true,
                title: '<img src="images/titulo.png" />',
                message: '<center><p><img src="images/spinner.gif" /></p><p><img src="images/mensagem.png" /></p></center>'
            });
        });
    });
</script>    
有人能帮我吗?
提前感谢。

我今天正在处理同样的问题,最终找到了解决方案。当一个操作触发以加载另一个页面时,BlockUI似乎无法加载图像。但是,如果在单击事件之前将图像预加载到JS中,则效果良好

$(document).ready(function () {

  //preload your images here
  img1 = new Image();
  img1.src = "images/titulo.png";
  img2 = new Image();
  img2.src = "images/spinner.gif";

  $('#btnSubmit').click(function () {
    $.blockUI({
      theme: true,
      title: '<img src="images/titulo.png" />',
      message: '<center><p><img src="images/spinner.gif" /></p><p><img src="images/mensagem.png" /></p></center>'
    });
  });

});

对我来说,最好的解决方案是在JSP中预加载图像,以便在JS文件中调用时能够正确显示:

     <div style="display: none;"> 
        <img src="images/loading.gif" alt="" /> 
     </div>

这是你的答案还是问题?
     <div style="display: none;"> 
        <img src="images/loading.gif" alt="" /> 
     </div>