javascript - How to load a script only for certain country in blogger? -
i have script want load country in blogger, how can that?
i tried doing like
<script> if (url contains .com) { <script src=""></script> } </script>
but it's not working because nesting of script failing, first </script>
tag closes outer <script>
well.
like this,
<script> if (url.indexof(".com") > -1) { var script = document.createelement('script'); script.src = "you/script/url"; document.getelementsbytagname('head')[0].appendchild(script); } </script>
Comments
Post a Comment