g(..).getValue(n)

Retrieves the .value property of the nth element in the Gimme Object's internal array.

Returns: The .value property of the nth element in the Gimme Object's internal array.
Params:
  • n, optional (default = 0): An integer value between 0 and g(..).length - 1 inclusive, which specifies the index of the element whose .value property is to be retrieved.

Examples:
// retrieves the .value property of the first <input> element whose type is "text" and whose class is "exciting"
var val = g('input[type="text"].exciting').getValue();

// retrieve the .value of the 2nd <select> element in the form #frm
var val = g('#frm select').getValue(1);

Last edited Jun 8, 2007 at 5:20 AM by sstchur, version 2

Comments

No comments yet.