我得到了一個場景,我需要在除IE7以外的所有瀏覽器中加載JavaScript。任何幫助是極大的讚賞。我試過下面的代碼:僅在IE7中禁用javascript
<!--[if gt IE 7]>
<script type="text/javascript">
//Some script XXX to execute
</script>
<![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<script type="text/javascript">
//Some script XXX to execute
</script>
<!--<![endif]-->
這是什麼話? –
如果您使用jQuery,爲什麼不使用它來檢測瀏覽器版本並執行條件執行。 –
[有條件的評論爲'除了IE8'?](http://stackoverflow.com/questions/1692129/conditional-comment-for-except-ie8) – epascarello