Loading ...

Highlight text in textbox with jquery | CodeAsp.Net

Highlight text in textbox with jquery

 /5
0 (0votes)

In this blog I will explain how highlight text in textbox on click inside it with jquery.It is useful when we have to copy text from textbox frequently.

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title></title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

</head>

<body>

<input id="txtText" type="text" value="This is test text"/>

</body>

<script type="text/javascript">

$(function()

{

$("#txtText").click(function()

{

$(this).focus().select();

});

});

</script>

</html>

 

Happy Reading.!

 

Comments (no comments yet)

Top Posts