JavaScript Change Placeholder Text
You can use the following JavaScript code snippets to change the placeholder text. // Option #1 – Plain JS document.getElementById(“someId”).placeholder = “newText”; // Option #2
You can use the following JavaScript code snippets to change the placeholder text. // Option #1 – Plain JS document.getElementById(“someId”).placeholder = “newText”; // Option #2
TL;DR: Here is a code snippet that you can use to change the text size. There is a full application in the post going over
TL;DR: Here is a code snippet that you can use to change the text of a button when you click on it. There is a
TL;DR: Here are code snippets you can use to change the address bar without reloading the page. Check out the post for an example application
TL;DR: Here is a code snippet you can use to change the background color of an element. (There is a full application in the post
In this post we are going to work with checkboxes. We will look at how we can check if checkboxes are checked, how we can
You can call a JavaScript function from HTML by adding the function call directly on the HTML element or by embedding the JS code into
It is possible to return multiple values form JavaScript functions, but those values have to be wrapped inside some sort of container. So in reality
Using JavaScript to get the current URL can be useful in a lot of ways. In this post we are going to go over the
In this post we are going to look at how we can use JavaScript to get input values. Having input boxes in applications is common,
There are multiple ways that you can use JavaScript to check if an object is empty or not. In this guide we are going to
Many applications need to get the current time, and luckily it is not so hard using JavaScript. In order to get the time we will
The .toUpperCase() function in JavaScript is a fairly straight forward function. You call the function on a string, and it will return the string with
In this guide we are going to look at how we can convert a decimal number to binary using JavaScript. We will also go the
Affiliate disclosure: As an Amazon Associate I earn from qualifying purchases. Learn JavaScript from the classic Head First JavaScript Programming book! Break and continue are
Finding the average of all the numbers in an array using JavaScript is quite easy. We will look at how we can do it using
In this post we are going to go over various ways we can use JS to remove either one or many commas from a string.
In this post we will go over how to check if a JS object has a key. 3 Ways to Check if a JavaScript Object