【问题标题】:window.location.reload(); is not working in ajax in IEwindow.location.reload();不能在 IE 中使用 ajax
【发布时间】:2013-04-24 12:23:55
【问题描述】:
jQuery.ajax(this.action, {
        data: jQuery(":text", this).serializeArray(),
        files: jQuery(":file", this),
        iframe: true,
        processData: false
    }).complete(function(data) {
           document.getElementById('jform_profile_Photo').value=data;//alert('Hiiiii')
           //document.getElementById('fields-container').innerHTML= 'Image changed !';
          window.location.reload();
    });

您好,我正在使用 ajax 功能上传个人资料图片。在firefox和google chrome上传头像后,页面会自动加载,新头像可见图片来了。

【问题讨论】:

  • 如果我不使用任何重新加载功能,在 firefox 和 google chrome 中工作正常,但在 IE 中不行。如果我使用任何重新加载功能,例如 window.location.reload();或 window.location.reload(true);

标签: php ajax jquery joomla2.5


【解决方案1】:

【讨论】:

    【解决方案2】:

    使用这个:

    window.location.reload(true);
    

    它应该可以解决问题,因为它会强制“硬”重新加载

    【讨论】:

      【解决方案3】:

      试试window.location=window.location

      【讨论】:

        猜你喜欢
        • 2011-04-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多