• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
JavaScriptSource

JavaScriptSource

Search 5,000+ Free JavaScript Snippets

  • Home
  • Browse Snippets
    • Addon
    • Ajax
    • Buttons
    • Cookies
    • CSS
    • Featured
    • Forms
    • Games
    • Generators
    • Image Effects
    • Math Related
    • Miscellaneous
    • Multimedia
    • Navigation
    • Page Details
    • Passwords
    • Text Effects
    • Time & Date
    • User Details
Home / Archives for Forms

Forms

How To Check if a Checkbox is Checked With JavaScript or jQuery

How To Check if a Checkbox is Checked With JavaScript or jQuery

Checking if a checkbox is checked in JavaScript can be done using the checked property of the checkbox element. This property returns a boolean value indicating whether the checkbox is currently checked or not. Here’s an example of how to check if a checkbox with the ID “myCheckbox” is checked using JavaScript: You can also […]

Forms

How To Validate an Email Address In JavaScript

How To Validate an Email Address In JavaScript

In this article, we will discuss several methods for validating email addresses in JavaScript, including using regular expressions and built-in JavaScript methods.

Forms

Preventing paste into an input field

Preventing paste into an input field

See the codepen: https://codepen.io/JSsnippets/pen/qBbyMoJ Source https://github.com/roeib/JavaScript-snippets#preventing-paste-into-an-input-field

Forms

Create a range slider

Create a range slider

This post introduces two popular ways to create a range slider.

Forms

Automatically expand a textarea as the user types

Automatically expand a textarea as the user types

A really neat little helper function that automatically expands a textarea as the user types in.

Forms

Trigger an event

Trigger an event

There are some special events that are avaialble as the method’s element.

Forms

Count the number of characters of a textarea

Count the number of characters of a textarea

Count the number of characters by handling the input event which is triggered if the value of element is changed.

Forms

Serialize form data into a query string

Serialize form data into a query string

This function serializes the form data which consists of names and values of its fields.

Forms

Validate Numeric Only

This script verifies that a string is numeric, otherwise it deletes the non-numeric character.

Forms

Input Mask

This script uses unobtrusive JavaScript to implement “input masks.” The maximum field length is automatically limited to the length of the mask. The characters that are entered into the fields are constrained, and separators are automatically added.

Forms

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

FREE UPDATES!

Get the latest updates in your inbox for FREE!

Popular Posts

Story Generator

IP Grabber – get a users IP address with JavaScript

Simple Calendar

Remove Ads

Astrological Calculator

Copyright © 2023 JavaScriptSource.com

  • About
  • Privacy Policy
  • Submit
  • FAQ
  • Jobs For Developers
  • Contact Us