You must Sign In to post a response.
  • Category: ASP.NET

    Javascript

    hi
    i want javascript for textbox key press event as user enters character '/' in text box it should get deleted...or restrict user from pressing char '/' in txt box...
    plz provide the script
  • #371088
    assign this function in onchange event of textbox

    function validateText()
    {
    var txt1 = document.getElementById('<%=TextBox1.ClientID%>');
    string str = value
    str = str.replace('/','');
    txt1.value=str;
    }

    Regards,
    Jeeth

  • #371089
    http://codingforums.com/showthread.php?t=62024

    hope that will help u

  • #371115
    hai
    Check this code

    function ScreenKey()
    {
    var key = window.event.keyCode;
    if (key != <here keycode of '/'>)
    return;
    else
    window.event.returnValue = null;
    }
    Hope this will help u


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.