!$。support.opacity - 服务器上的行为与localhost不同

时间:2013-11-07 22:19:52

标签: javascript jquery internet-explorer iis browser-support

我有一个在MVC4中开发的View,它使用以下客户端JavaScript使用jquery-1.10.2.min.js lib来查看用户的浏览器是否可以执行某些操作,因此我们知道在使用时如何处理它们http://www.plupload.com/

我正在运行IE 10.0.9200.1671,当我在通过VS运行MS Cassini服务器的本地Windows 7 PC上运行此代码时,我的customRuntime不是'html4',这是我所期望的。但是,如果在运行MS IIS8的Test和QA Windows 2012服务器中使用同一浏览器中的其他选项卡并指向此代码的相同版本,则显示customRuntime为'html4'。

    $(document).ready(function () {

        var customRuntime = 'gears,html5,flash,silverlight,html4';

        //Check to see if browser is IE and version is 8 and less, if so set the runtime to Html4 for plupload.
        if (!$.support.opacity) {
            /* IE 6 to 8 */
            customRuntime = 'html4';
        }

        $('#pickfiles').click(function () {
            $('#help2,#help3,#help4').hide();
            $('#help1').show();
            $('.file.failed').remove();
        });

        uploader = new plupload.Uploader({
            chunk_size: '1500kb',
            multipart: true,
            runtimes: customRuntime, //'gears,html5,flash,silverlight,html4',
            browse_button: 'pickfiles',
            container: 'ulcontrol',
            max_file_size: '500mb',
            url: 'ProcessUpload',
            //  resize: { width: 320, height: 240, quality: 90 },
            flash_swf_url: '/assets/plupload/plupload.flash.swf',
            silverlight_xap_url: '/assets/plupload/plupload.silverlight.xap',
            filters: [
                { title: "Data Files", extensions: "zip,csv" }
            ],
            multiple_queues: false
        });

        uploader.bind('Init', function (up, params) {
            $('#runtime').html(params.runtime + " runtime");
        });

        uploader.init();
        ...

再次在同一个浏览器中,当指向我的本地服务器时,我得到“html5运行时”,当指向Test和QA时,我得到“html4运行时”。我在服务器上寻找丢失的文件/库,代码看起来已完全部署。我的上传在所有环境中都运行良好,但我期望的一些HTML5好东​​西没有发生,我发现IE 10报告的网站与网站的区别不同。

我的主要问题是,当在同一浏览器中呈现时,此客户端代码的行为会有何不同?

提前致谢。

1 个答案:

答案 0 :(得分:1)

我们遇到了类似的问题,我们不得不在html文档中添加以下标题

IE10 renders in IE7 mode. How to force Standards mode?

相关问题