phphelpme Posted December 9, 2012 Share Posted December 9, 2012 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> Quote Link to comment https://forums.phpfreaks.com/topic/271796-grab-certain-part-of-the-url-bar/ Share on other sites More sharing options...
codefossa Posted December 10, 2012 Share Posted December 10, 2012 Show an example of the URL and say what you want out of it? Quote Link to comment https://forums.phpfreaks.com/topic/271796-grab-certain-part-of-the-url-bar/#findComment-1398467 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.