Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

select() in javascript

// select() in javascript
// add below code to your javascript file
function selectText() {
  const input = document.getElementById('text-box');
  input.focus();
  input.select();
}

// add below code to your html file
<input type="text" id="text-box" size="20" value="Hello world!">
<button onclick="selectText()">Select text</button>
Comment

.select js

function selectText() {
  const input = document.getElementById('text-box');
  input.select();
}
Comment

javascript DOM SELECT

javascript DOM Selection
Comment

PREVIOUS NEXT
Code Example
Javascript :: react-native-google-places-autocomplete only cities 
Javascript :: next js styled components classname did not match 
Javascript :: how to pass a prop in route 
Javascript :: how to export module in node js 
Javascript :: destructuring objects 
Javascript :: how to clear input value in antdesign form on submit 
Javascript :: reverse a string while keeping spaces in javascript 
Javascript :: ssg full form in nextjs 
Javascript :: ajax is not a function 
Javascript :: online python to c converter 
Javascript :: jquery attribute 
Javascript :: date now javascript 
Javascript :: find the last occurrence of a character in a string javascript 
Javascript :: mod operation in shopify 
Javascript :: operator to return specific data of a mongodb query 
Javascript :: woocommerce update mini cart ajax 
Javascript :: ngmodel component angular 
Javascript :: command to run nextjs project 
Javascript :: node.js check if a remote URL exists 
Javascript :: abrir dialog angular material 
Javascript :: what is json used for 
Javascript :: cheerio 
Javascript :: nextjs react native web typescript 
Javascript :: discord.js ban user 
Javascript :: card react native 
Javascript :: js sleep 1 sec 
Javascript :: react-floating-whatsapp 
Javascript :: bfs javascript 
Javascript :: javascript spread operator 
Javascript :: supertest express check response 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =