About 269,000 results
Open links in new tab
  1. How do I make an input field accept only letters in javaScript?

    If you want only letters - so from a to z, lower case or upper case, excluding everything else (numbers, blank spaces, symbols), you can modify your function like this: if (document.myForm.name.value == "") { alert("Enter a name"); document.myForm.name.focus(); return false; if (!/^[a-zA-Z]*$/g.test(document.myForm.name.value)) {

  2. JavaScript Form Validation - W3Schools

    JavaScript Form Validation. HTML form validation can be done by JavaScript. If a form field (fname) is empty, this function alerts a message, and returns false, to prevent the form from being submitted:

  3. Form Validation < JavaScript - The Art of Web

    Mar 10, 2023 · Validation of form elements using JavaScript. Examples for different form elements including: text input, checkbox, combo box, radio buttons and checkbox arrays. Restricting text input to alphanumeric characters and spaces. How to use selectedIndex.

  4. JavaScript Form Validation : quick and easy!

    First, download the JavaScript form validation script here. The zip file contains the javascript file, examples. The script has a catalog of almost all the common validation types built-in. The idea is to create a set of “validation descriptors” associated with each element in a form.

  5. JavaScript Form Validation - GeeksforGeeks

    Jan 9, 2025 · In this article, we will guide you through creating a form validation application. This application will validate essential fields such as firstName, lastName, userName, email, and password. We will explore two different approaches for form validation.

  6. javascript - Seperate boxes for each letter in an Input field

    Jan 15, 2014 · lettering.js is a JavaScript library that provides functionality very similar to what you are looking for. On the other hand, if you are looking to implement your own solution, this is how I would do it: 1) Grab the paragraph you want to "boxify"

  7. Master JavaScript Form Validation by Building a Form from …

    Summary: in this tutorial, you’ll learn about JavaScript form validation by building a signup form from scratch. Before submitting data to the server, you should check the data in the web browser to ensure that the submitted data is in the correct format. To provide quick feedback, you can use JavaScript to validate data.

  8. JavaScript HTML Input Examples - W3Schools

    Examples of using JavaScript to access and manipulate HTML input objects. Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.

  9. Working with form text boxes in JavaScript - BrenkoWeb

    The text type uses size, value, maxlength attributes which define the size of text fied, default value of text box and maximum length of characters which can be added to text box respectively. The textarea is a multiline text box which takes multiple lines such as address, etc...

  10. Form Validation Using JavaScript | FormGet

    Form validation is done to check the accuracy of the user’s entered information before they could submit the form. What validation checks in the form? It’s meant to check the following things: Check for Empty Field: Has the user left required field empty. If it’s there, returns alert message.

  11. Some results have been removed
Refresh