So, the question is:
Is it possible to copy data from select
element without additional plugins(jQuery is ok, but nothing else), like there:
https://stackoverflow.com/a/30810322/5490451
The main problem is here:
var copyTextarea = document.querySelector('.js-copytextarea');
copyTextarea.select();
If we work with textarea
- everything is fine, but for select
it's not applicable. I can't select the data inside the select
element.
Any ideas, guys?
Use case: I want to set a function on onchange
event for select
element with a list of values, copy these values, and paste into textarea
or another element, it doesn't matter