I am going through a webpage source and trying to figure out how a search is being executed.
Inspecting the search button and input gives me this:
<h2>Search the MySite.net Forum</h2>
<form action="?" method="post">
<p>
<b>Search for:</b>
<input type="text" name="s" placeholder="Search..." style='width:90%;' maxlength="255" />
</p>
<p>
<p>Search in:</b>
<select name="in">
<option value="ft">forum title or text</option>
<option value="tt">thread titles</option>
<option value="pt">poll titles</option>
</select>
</p>
<p>
<input type="submit" value="Search the MySite.net Forum" />
</p>
</form>
The only available script related contains this:
$('#search-submit').click(function() {
var q = $('#searchq').val();
if(q.match("site:mysite.net")) { return; } else { $("#searchq").val(q+ ' site:mysite.net'); }
});
- Can someone clarify the form attribute
action="?"
. I'm not used to seeing that AND thePOST
method, I thought it was only forGET
. What does it mean? - I don't understand the
q.match("site:mysite.net")
, I am having a hard time finding the meaning of the colon("site:mysite.net")
searching a ':' is throwing me all over the place. I assumed it's searching the whole site, but that doesn't seem right. Can someone clarify this for me as well.