jquery check if url contains string
//If URL contains "mystring"
if (window.location.href.indexOf("mystring") > -1) {
}<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>
Also in JavaScript:
- how to made disktop program on react website
- datepicker range npm reactjs
- get ckeditor textarea value in jquery
- afficher un div qui etait cache en javascript
- javascript date convert to unix
- useeffect react
- jquery is checked
- jquery wait for element to exist
- react native onChangeText resize the background image
- using fb login with angular app
- javascript shift
- heap sort
- MuiInputLabel-shrink change styles
- how to find area of polygon with coordinates in javascript
- how to update node
- canvas fillrect
- Find a vowel at the begining and end with regular expression
- javascript genreate number id
- jquery-3.5.1.min.js download
- how to check size of stack Javascript
- how to send data using ajax
- simple return data jquery
- javascript prototype explained
- how to sepaarte text in object javascript