I have this javascript code:
<script>
var burl = location.search;
</script>
It fetches variables after ? from my page url http://example.com/index.xhtml?hash=37393 which is = hash=37393 and it creates a button with this javascript code:
<script>
document.write('<input type="button" name="hash" value="' + burl + '" id="buttonjs" style="font-weight: normal; font-family:Verdana,sans-serif; font-sizes:15px;line-height:1.5; padding: 10px; margin: 10px; text-align: center; background: green; border: 1px solid #c0c0c0; color: white; font-weight: bold; border: 3px; width: 100%; box-shadow: 3px 3px 3px black; border-radius: 16px;"/>');
</script>
Is there any way i can make the code fetch only the hash variable from page url which is 37393 ?