Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. How to restrict user not to enter <> characters in text box.

How to restrict user not to enter <> characters in text box.

Scheduled Pinned Locked Moved JavaScript
tutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    InderK
    wrote on last edited by
    #1

    Hi,

    I need some info from you guys.

    Can anyone please give me idea how to restrict user not to enter "<" and ">" character in text box and even user not able to paste these characters?

    Thanks,
    Inder K...

    T B J 3 Replies Last reply
    0
    • I InderK

      Hi,

      I need some info from you guys.

      Can anyone please give me idea how to restrict user not to enter "<" and ">" character in text box and even user not able to paste these characters?

      Thanks,
      Inder K...

      T Offline
      T Offline
      twseitex
      wrote on last edited by
      #2

      Hi, after input of every char check this char and set .value of textarea with checked values.

      1 Reply Last reply
      0
      • I InderK

        Hi,

        I need some info from you guys.

        Can anyone please give me idea how to restrict user not to enter "<" and ">" character in text box and even user not able to paste these characters?

        Thanks,
        Inder K...

        B Offline
        B Offline
        berba
        wrote on last edited by
        #3

        Hi maybe this link can help you http://www.tizag.com/javascriptT/javascriptform.php[^]

        1 Reply Last reply
        0
        • I InderK

          Hi,

          I need some info from you guys.

          Can anyone please give me idea how to restrict user not to enter "<" and ">" character in text box and even user not able to paste these characters?

          Thanks,
          Inder K...

          J Offline
          J Offline
          John Y
          wrote on last edited by
          #4

          You can either check the value on form validation and/or handle the onChange event for the text box, and check for those characters. ________ John Y. Developer

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups