jquery-1.8.2.js crash with internet explorer brows

2019-05-26 04:52发布

问题:

Hello I'm going crazy behind this compatibility issue with ie. The problem occurs only with internet explorer (I have version 10), I have no problems with firefox. I'm trying to open a sliding form (not created by me, specifically: a link but when I go to run the code (only on internet explorer) I get the following exception. Do you know tell me what is due?

// 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.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 ) {
ret = document.createAttribute( name );
elem.setAttributeNode( ret );
}
return ( ret.value = value + "" ); --> exception in jquery-1.8.2.js cannot find a member
}
};

I was forgetting, I'm using vc2012 with a template mvc4.

Tanks

回答1:

This issue normally arises when trying to run your app in IE 10 using different browser modes.

To fix that press F12 and check for the Browser mode and Document Mode. Probably one of them is IE 8 or below. Change the "Browser Mode" to "IE10" and "Document Mode" to "Standards".