Answers for "get text selected option javascript"

4

get selected text js

// Get highlighted text this way:

window.getSelection().toString()
Posted by: Guest on April-08-2020
1

get selected text of html dropdown in javascript

var e = document.getElementById("selectElementID");
var value=e.options[e.selectedIndex].value;// get selected option value
var text=e.options[e.selectedIndex].text;
Posted by: Guest on March-17-2020
0

javascript get selected text

const getSelectedText = () => window.getSelection().toString();

getSelectedText();
Posted by: Guest on September-28-2021

Code answers related to "get text selected option javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language