getValue

Get the value of a <textarea> or text <input> found by given selector.

Usage

1
client.getValue(selector).then(callback);

Parameters

Param Type Details
selector String input or textarea element

Example

index.html
1
<input type="text" value="John Doe" id="username">
getValue-with-promises.js
1
2
3
client.getValue('#username').then(function(value) {
console.log(value); // outputs: "John Doe"
});
getValue-with-callbacks.js
1
2
3
client.getValue('#username', function(err, value) {
console.log(value); // outputs: "John Doe"
});

Uses