Posted By

nicolaspar on 05/30/07


Tagged

get url String querystring query parser leer part


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
danielwrobert


Javascript - Get Part Url


 / Published in: JavaScript
 

Para marcar navegaciones según la página.

  1. function getPartUrl(part) {
  2. var query = self.location.href;
  3. if( query.indexOf(part) == -1 ){
  4. return false;
  5. }else{
  6. return true;
  7. }
  8.  
  9. }
  10. //Example
  11. <script>document.write getPartUrl('news.php') ? 1 : 0</script>

Report this snippet  

You need to login to post a comment.