Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi every one,
I have place one textbox in my webpage after enter the value i want add some symbols at run time. Ex..I enter Hello after exit the textbox i want show like ******* Hello****** how can i do it? Any one knows pls guide me.

Thanks..
Thiygu
Posted

1 solution

Hi,

I tried some code for it check it...

HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script language="javascript" >
        function chng() {
            document.getElementById("txtname").value = "*********" + document.getElementById("txtname").value + "*******";
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type ="text" id="txtname" onfocusout="chng()" />
    </div>
    </form>
</body>
</html>


Here I used javascript


I hope my quess is right in your question.

All the Best
 
Share this answer
 
Comments
rkthiyagarajan 22-Sep-11 12:10pm    
Thanks murali.. Its work but again i am exit that textbox its take add another same stars.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900