Category: JavaScripts (Page 7 of 13)

Explore JavaScript tutorials that cover everything from basics to advanced techniques. This category includes guides on DOM manipulation, event handling, APIs, asynchronous programming, and tips for building interactive and dynamic web applic

How to capitalize the first letter of a string in JavaScript

Last updated on November 26th, 2024 at 12:19 pmThis JavaScript function capitalizes the first letter of each word in a given string and assigns the result to an input element That being said lets take a look at how this script looks like, Using map: charAt and slice: Assuming there’s an input field with the […]

How to get screen resolution using Javascript

Last updated on August 8th, 2022 at 09:55 amThis is a simple script that can capture screen resolution of a user. We are using screen function available in javascript. Here are some of the attribute you can use while dealing with screen As we can see screen has attributes like availWidth availHeight width height colorDepth […]

How to encode and decode string using JavaScript

Last updated on November 13th, 2024 at 09:35 amThis JavaScript code defines two functions, str_to_num and num_to_str, to convert a text string to a sequence of numbers and vice versa, with a basic encoding/decoding method Function str_to_num Function num_to_str HTML CODE DEMO

How to Implement JavaScript Profanity (bad words) Filter for Web Forms

Last updated on May 7th, 2025 at 07:49 amIncorporating a profanity (bad words) filter into your web forms is essential for maintaining a respectful and user-friendly environment. Ensuring that user-generated content on your website remains appropriate is crucial. One effective method is to implement a client-side filter that detects and prevents the submission of messages […]

« Older posts Newer posts »