https://github.com/zenorocha/select
Programmatically select the text of a HTML element
https://github.com/zenorocha/select
Last synced: 2 months ago
JSON representation
Programmatically select the text of a HTML element
- Host: GitHub
- URL: https://github.com/zenorocha/select
- Owner: zenorocha
- Created: 2015-10-19T18:48:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T17:30:45.000Z (over 6 years ago)
- Last Synced: 2025-05-09T06:48:56.015Z (2 months ago)
- Language: JavaScript
- Homepage: http://npmjs.com/select
- Size: 20.5 KB
- Stars: 167
- Watchers: 2
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# select
[](https://travis-ci.org/zenorocha/select)
Programmatically select the text of a HTML element.
## Install
You can get it on npm.
```
npm install select --save
```Or bower, too.
```
bower install select --save
```If you're not into package management, just [download a ZIP](https://github.com/zenorocha/select/archive/master.zip) file.
## Usage
### Standalone
```html
```
```js
var input = document.querySelector('input');
var result = select(input);
```### Browserify
```js
var select = require('select');
``````js
var input = document.querySelector('input');
var result = select(input);
```## License
[MIT License](http://zenorocha.mit-license.org/) © Zeno Rocha