javascript - Would this conditional statement work in an HTML page? -


i want load html5shiv.js file if web browser less ie 9.

the code have is

<doctype html>  <html>  <head>   <!--[if lt ie 9]       <script type="text/javascript" src="html5shiv.js"></script>   -->  </head>  <!-- ... --> </html> 

when test see if works or not (i changing browser mode option version lower ie 9 in developer tools - i'm not clear whether works or not.

does work - or code atleast right?

you may missing chevron @ end of first line , closing tag:

<!--[if lt ie 9]>  <script type="text/javascript" src="html5shiv.js"></script> <![endif]--> 

Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -