;//my mistake is there \r\n\t}\r\n","answerCount":2,"upvoteCount":2,"suggestedAnswer":[{"@type":"Answer","text":"http://stackoverflow.com/questions/15521343/conditionally-load-javascript-file\n\nRefer this link. Exactly what you want.","upvoteCount":5},{"@type":"Answer","text":"Thank you","upvoteCount":1}]} }
+ 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>

6th Apr 2017, 5:06 PM
Ani Naslyan
Ani Naslyan - avatar
2 Réponses
6th Apr 2017, 5:18 PM
Ashwani Kumar
Ashwani Kumar - avatar
+ 1
Thank you
6th Apr 2017, 5:53 PM
Ani Naslyan
Ani Naslyan - avatar