How do you get all of the inputs
of form on a page into an array while matching by input type(text|checkbox|radio)?
JavaScript:
Just plain js
like this will give me ALL of the inputs
var inputs = document.getElementsByTagName( 'input' );
Now with jQuery:
I have jQuery loaded and I tried: as per docs (http://api.jquery.com/text-selector/)
$( "<input>" ).is( ":text" );
$( "<input>" ).is( "[type=text]" );
Console Error message:
TypeError: undefined is not a function
message: "undefined is not a function"
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
__proto__: Error
Additional information:
The page I am trying to get text
inputs on is in an iFrame and this whole interaction is running within a webkit.
- My main page has jQuery loaded.
- The iFrame page does not.
Need to get inputs on iFrame page with jQuery from my main page.