JavaScript
A5.u.htmlsearch Method
Syntax
A5.u.html.search(html,search)
Arguments
- htmlstring
The HTML to search.
- searchstring
The value to search for.
Returns
- indexnumber
The index of the first
Description
Search the text of an HTML string.
Discussion
This method will search the text content of an HTML for a given value.
Example
var html = '<p class="main">Now is the <em>time</em> for all good men to come to the aid of the party</p>'; var indxHTML = A5.u.html.search(html,'m'); var indxString = html.search('m'); // indxHTML = 33 // indxString = 10