Return to Snippet

Revision: 34531
at October 24, 2010 06:44 by Nettuts


Initial Code
// If href does not contain "http" at the beginning, or it's an absolute, but local href, must be local.
var isLocal = ( !/^(http)/.test(href) ) || ( href.indexOf(location.hostname) > -1 );

Initial URL


Initial Description


Initial Title
Anchor Href is Local?

Initial Tags


Initial Language
JavaScript