About 337,000 results
Open links in new tab
  1. Sanitizing user input before adding it to the DOM in Javascript

    Sanitizing user input before adding it to the DOM in Javascript Asked 15 years, 5 months ago Modified 1 year, 5 months ago Viewed 219k times

  2. How do I get the value of text input field using JavaScript?

    Jul 19, 2012 · There are various methods to get an input textbox value directly (without wrapping the input element inside a form element): Method 1 …

  3. How to save user input into a variable in HTML and JavaScript

    Learn how to save user input into a variable using HTML and JavaScript with this comprehensive guide.

  4. javascript - How to get numeric value from a prompt box ... - Stack ...

    Jul 28, 2013 · I was trying to do some simple mathematical calculations in HTML and jQuery and JavaScript, so I wanted to get input from user. For input I tried doing this : var x = …

  5. How to take keyboard input in JavaScript? - Stack Overflow

    Dec 11, 2010 · I want to take keyboard input in JavaScript, where arrow keys, when pressed, will result in the change in shape of a particular shape. How do I take the input of any of the keys …

  6. javascript - User text input with an if statement - Stack Overflow

    This Stack Overflow page discusses using JavaScript to handle user text input with if statements, providing examples and solutions for developers.

  7. Is there a better way to sanitize input with javascript?

    May 4, 2014 · I wanted to write a javascript function to sanitize user input and remove any unwanted and dangerous characters. It must allow only the following characters: Alfanumeric …

  8. Best way to handle security and avoid XSS with user entered URLs

    Oct 16, 2008 · I do need to second @Nick's comment - Javascript is not synonymous with a URL. Are you sure this isn't a question about sanitizing user input, and preventing entered data from …

  9. How to get user input from javascript form? - Stack Overflow

    Jan 3, 2018 · so my question is pretty simple. How to I get user input from a form and put it into a variable ? Im struggling to do this simple task and would appreciate some help. Here is my …

  10. javascript - How to prevent user from typing in text field without ...

    Aug 5, 2011 · Learn how to restrict user input in a text field using JavaScript without disabling the field.