IE11 Quirks Mode和JQuery无法正常工作

时间:2014-09-03 14:13:17

标签: jquery internet-explorer-11 quirks-mode

在我们测试所有应用程序之前,我们的系统人员已经帮助我们将所有浏览器更新到IE11。

我们的一个应用程序在IE11下无法正常运行,使其正确呈现的唯一方法是使其在quirks模式下运行(我相信现在在IE11中模拟IE5?),但该站点使用JQuery如果它通过这种模式渲染,虽然它渲染正常但功能不起作用,我们在加载页面时收到jquery错误,例如未找到的成员'以下jquery函数出错(特别是在返回行上):

// IE6/7 do not support getting/setting some attributes with get/setAttribute
if ( !getSetAttribute ) {

    fixSpecified = {
        name: true,
        id: true
    };

    // Use this for any attribute in IE6/7
    // This fixes almost every IE6/7 issue
    nodeHook = jQuery.valHooks.button = {
        get: function( elem, name ) {
            var ret;
            ret = elem.getAttributeNode( name );
            return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
                ret.nodeValue :
                undefined;
        },
        set: function( elem, value, name ) {
            // Set the existing or create a new attribute node
            var ret = elem.getAttributeNode( name );
            if ( !ret ) {
                ret = document.createAttribute( name );
                elem.setAttributeNode( ret );
            }
            return ( ret.nodeValue = value + "" );
        }
    };

除了重新编写申请外,有没有人有任何建议?

由于

0 个答案:

没有答案