Reputation: 845
If location.href.match(i) matches in the URL,
how do you use javascript to match for something throughout the entire document without jquery?
Upvotes: 0
Views: 3274
Reputation: 23406
Try this: res=document.body.innerHTML.match(i);
. And if you want include the head part of the document: document.documentElement.innerHTML...
.
Upvotes: 2