Javascript - Get Part Url


/ Published in: JavaScript
Save to your folder(s)

Para marcar navegaciones según la página.


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.