JSFiddle - React, Tailwind, and code Playground
JavaScript
var url = "www.site.com/index.php#hello";
var hash = url.substring(url.indexOf('#')+0);
alert(hash);
var url = "www.site.com/index.php#hello";
var hash = url.substring(url.indexOf('#')+0);
alert(hash);