Jump to content

Grab Certain Part Of The Url Bar ?


phphelpme

Recommended Posts

im trying to grab something from the url bar , a phrase but it wont show up ?? please help !

 

 

 


<script type='text/javascript' src='jquery.min.js'></script>



<script>

function myFunction(sender) {

   var id = '#' + sender.getAttribute('href').split('#')[1];

   or `'#' + sender.href.split('#')[1]`

   or `'#' + $(sender).attr('href').split('#')[1]`



}

</script>

Copy and paste code from This page into the code box on the homepage and go claim your likes!!!<br>



Your code is <script> document.write(myFunction()) </script>

Link to comment
https://forums.phpfreaks.com/topic/271796-grab-certain-part-of-the-url-bar/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.