Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

html - How to write conditional comment for non IE browsers?

I don't want to use a couple of javascript plugins for IE 6/7. But I want to use them for all other browsers.

How can I do it? Is there any way I can do it?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

From the Wikipedia article on conditional comments (modified to fit your version requirements):

<!--[if gt IE 7]><!-->
<p>This code displays on non-IE browsers and on IE 8 or higher.</p>
<!--<![endif]-->

The weird markup in the first line serves to make the markup standards compliant.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...