Solution for "if link contains word react"

//If URL contains "mystring" if (window.location.href.indexOf("mystring") > -1) { }

jquery check if url contains string

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { if (window.location.href.indexOf("franky") > -1) { alert("your url contains the name franky"); } }); </script>

check if url contains string

Similar codes for "if link contains word react"


Latest 'Javascript' questions

Added before "if link contains word react"