Window.location
PropertyYou can simply use the location property of a window (i.e. window.location
) to check whether a URL contain hash (#
) or fragment component or not in JavaScript.
Let's take a look at the following example to understand how it basically works:
<script>
if(window.location.hash){
alert("Fragment component exists");
} else{
alert("Fragment component doesn't exist");
}
</script>
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
How to Send Simultaneous cURL Request using curl_multi_exec
In this article, i will share with you h...let vs var in JavaScript
If you have worked in Javascript, you ha...How To Fix GroupBy Not Working In Laravel
Recently we are working with laravel app...How to Create Previous Next Simple Pagination in Laravel?
Laravel provided two type pagination....How to Generate QR Code in Laravel 8
QR(Quick Response) code is a type of bar...