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

JavaScriptSource

Search 5,000+ Free JavaScript Snippets

  • Home
  • Forum
  • 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

How to Get the Query String in JavaScript

How to Get the Query String in JavaScript

When you’re working with JavaScript, sometimes you need to access query string parameters in your script.

Miscellaneous

Check if the given year is a leap year

Check if the given year is a leap year

Use new Date(), setting the date to February 29th of the given year. Use Date.prototype.getMonth() to check if the month is equal to 1.

Time & Date

JavaScript Functions Explained

JavaScript Functions Explained

JavaScript functions are reusable blocks of code that perform a specific task, taking some form of input and returning an output.

Basics

Submit a form with Ajax

Submit a form with Ajax

The following function submits the data of formEle to the back-end using an Ajax request

Ajax

Get and Set Classes On An Element

Get and Set Classes On An Element

Get all of the classes on an element as a string, add a class or classes, or completely replace or remove all classes.

CSS

Check if an Object Is Empty

Check if an Object Is Empty

ere are some different methods that you could use to check if an object is empty in modern browsers that support the ES5 edition of JavaScript.

Miscellaneous

JavaScript Variables Explained

JavaScript Variables Explained

Variables are named values and can store any type of JavaScript value.

Basics

Strip HTML from a given text

Strip HTML from a given text

Here are 2 ways to strip HTML code from a given text.

Miscellaneous

Add, remove, toggle, and check for the presence of a class

Add, remove, toggle, and check for the presence of a class.

Here are some handy, simple ways to manipulate CSS classes.

CSS

Remove a Character From a String in JavaScript

Remove a Character From a String in JavaScript

How can you remove a character from a string in JavaScript? Here are a few different ways to do this.

Miscellaneous

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 16
  • Go to Next Page »

Primary Sidebar

FREE UPDATES!

Get the latest updates in your inbox for FREE!

Popular Posts

Story Generator

IP Grabber

Simple Calendar

Remove Ads

Astrological Calculator

Copyright © 2021 JavaScriptSource.com

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