How can I get all form names exists on a page using jquery??? can I use jquery input selector to find all forms on a page.
for example I have a form on page like below
<form name="searchForm" id="searchForm" action="">
<input type="text" name="inputname" />
</form>
now i want to find the form name “searchForm” using jquery. so how can i do this??
please help me.
thanks.
Read this: http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
Your question is unclear: the first sentence sounds like you want to use jQuery to get a list of all form names on the page, but then you say you want to find “searchForm”, implying you want to select a form that you already know the name of.
To get all form names and store them in an array:
To select a form you already know the name of:
Or you can just select by id: