How to use HTML DOM Select remove in JavaScript

In this article I am going to explain about select remove method in JavaScript.
  • 1845

HTML DOM  Textarea Select remove method

The DOM textarea select method is used to selects the entire content of a text area.

Syntax of textarea  select method

textareaobject.select()


Browser support

The textarea select  method  is supported in all major browser.

Example of textarea select method

<html>

<head>

<script type="text/javascript">

    function Result() {

        document.getElementById("TextArea").select();

    }

</script>

</head>

<body>

<textarea id="TextArea" cols="20">

The DOM textarea select method is used to selects the entire content of a text area.

</textarea>

<br />

<button type="button" onclick="Result()">Click here for selecting text area</button>

</body>

</html>

Output:

Before clicking button output is:

before clicking remove new mwth.jpg

After clicking button output is:

after clicking remove new meth.jpg

You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.