3 ::selection { background-color: rgba(63, 128, 33, 0.95); color: yellow; }
5 <input id="inputText" type="text" value="Hello" style="border: 5px solid;
6 width:100px; font-size: 16px; font-family:sans-serif;
7 padding: 0; margin: 0; outline:none;"><br>
8 <br>The above selected text in the input box should have green background and yellow color.
10 window.onload = document.getElementById('inputText').select();