See if the page has a JS
var slist=document.getelementsbytagname (' script ') | | [];
var reg=/jquery\.min\.js/i;
for (Var i=0;i<slist.length;i++) {
if (Reg.test (SLIST[I].SRC)) {
Return
}
}
The simplest regular expression that will match the string "JQuery.min.js"
"I" means no case,I flag (i is ignorecase or case-insensitive)
Document. Url.match (/[^:]+/)
[] matches any character in the specified range, in [] it represents a negative character set,
Matches any character not in the specified range, where all characters except ': ' are matched
The + sign indicates that the character must appear at least 1 times
The match () method retrieves the specified value within a string, or finds a match for one or more regular expressions.
Stringobject.match (Searchvalue) stringobject.match (regexp)
(function() { console.info (document. URL) var r =document. Url.match (/[^:]+/); Console.info (R); var rs =document. Url.match (/[^:]+/g); Console.info (RS); }) ();
http://localhost:63342/cquery/jsfunctiontest/match.html["http"]["http", "// LocalHost "," 63342/cquery/jsfunctiontest/match.html "]
JavaScript Regular Example