+ 2
<script> tag after if conditional statement
I want to add <script> after if conditional statement: <script type="text/javascript"> str=location.href.toLowerCase() if (str == "sth") { <script type="text/javascript" src="js/slide.js"></script>;//my mistake is there } </script>
2 Answers
+ 5
http://stackoverflow.com/questions/15521343/conditionally-load-javascript-file
Refer this link. Exactly what you want.
+ 1
Thank you