Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
501 views
in Technique[技术] by (71.8m points)

internet explorer - Force document mode=IE8 Standards

So I am having problems getting IE8 to not default to IE7 document mode, as our intranet is set up.

I am using IE dev tools to set plus a little bit of js to check what the browser is reporting the document mode to be.

I won't be able to change any settings other than what markup I can give. In otherwords I'm not an admin, the only control I have is within the browser.

I have tried:

<meta http-equiv="x-ua-compatible" content="IE=8">

But this does not change how the document mode is reported, it still reported as IE7.

JS Fiddle

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

One might think is would be a prerequisite, and I would agree.

But whilst working locally I hadn't declared a doctype:

Make sure you declare one:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <meta http-equiv="x-ua-compatible" content="IE=8" >

Jobs a good'n


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...