Posted By

serialk89 on 11/23/10


Tagged


Versions (?)

DETERMINAR EL MODO DE COMPATIBILIDAD IE


 / Published in: JavaScript
 

determina en el modo de compatibilidad que tiene IE

  1. //DETERMINAR EL MODO DE COMPATIBILIDAD
  2. engine = null;
  3. if (window.navigator.appName == "Microsoft Internet Explorer")
  4. {
  5. // This is an IE browser. What mode is the engine in?
  6. if (document.documentMode) // IE8
  7. engine = document.documentMode;
  8. else // IE 5-7
  9. {
  10. engine = 5; // Assume quirks mode unless proven otherwise
  11. if (document.compatMode)
  12. {
  13. if (document.compatMode == "CSS1Compat")
  14. engine = 7; // standards mode
  15. }
  16. }
  17. // the engine variable now contains the document compatibility mode.
  18. if(engine == 7){
  19. alert("Modo de compatibilidad IE7");
  20. }
  21. }

Report this snippet  

You need to login to post a comment.