1

asp.net mvc4 Web アプリがあります。開発ツールから、IE 7 に切り替えると、ログイン ページ (mvc 4 のインターネット アプリケーション テンプレートに付属するデフォルト) に移動すると、jquery-1.9.1.js がクラッシュします。

jquery-1.9.1.js は、コードの一部である 2582 行目でクラッシュします。

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

    // 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 = elem.getAttributeNode( name );
            return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
                ret.value :
                undefined;
        },
        set: function( elem, value, name ) {
            // Set the existing or create a new attribute node
            var ret = elem.getAttributeNode( name );
            if ( !ret ) {
                elem.setAttributeNode(
                    (ret = elem.ownerDocument.createAttribute( name ))
                );
            }

            ret.value = value += ""; <---- HERE IE 7 CRASHES!!!!!

            // Break association with cloned elements by also using setAttribute (#9646)
            return name === "value" || value === elem.getAttribute( name ) ?
                value :
                undefined;
        }
    };

上記のように、次の行でクラッシュします。

ret.value = value += "";

ret.value が null で、値が「novalidate」

エラー発生は次のようなものです: javascript ランタイム エラー: メンバーが見つかりません。

IE 10 から実行してから互換モードに切り替えると、同じエラーが発生します。

誰かがこれを解決する方法を教えてもらえますか?

最初の試み : 最新のレンダリング エンジンが使用されていることを確認するために、次のメタを使用しました。

<meta http-equiv="X-UA-Compatible" content="IE=edge">

以下のページも参照してください: IE 7 互換モードで JQuery の控えめな検証を行うと、フォームのあるページで「メンバーが見つかりません」というエラーが発生する

しかし、純粋なIE 7ブラウザーを使用すると機能しないようです...

何か案は?

4

0 に答える 0