문제

i'm trying to disable my website when a user access the site in ie and use the quirks mode, someone know a script in php or javascript that disable or verify this case?

Thanks.

도움이 되었습니까?

해결책

You can check document.compatMode and see if it matches "CSS1Compat".

var isQuirky = (document.compatMode !== 'CSS1Compat');
if (isQuirky === true) {
  alert('Your browser is rendering this page in quirks mode, and it may not display properly.');
}

다른 팁

You can check it using document.compatMode property

if document.compatMode is CSS1Compat then the mode is standard otherwise it is Quirk

document.compatMode==='CSS1Compat'?'Standards':'Quirks') + ' mode.'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top