You can use the CSS “content” property to add contents in your web page. However, this property can only be used with pseudo elements like ::before and ::after. ...
“variable is undefined” says the browser console. It’s an error message, which indicates that a variable inside a JavaScript code is declared but has no value. It’s a very common ...
A DIV element on a webpage can have different types of elements showing data in many forms. The DIV serves as a container. Now, sometimes you might want to look for elements in a DIV with id’s that ...
You can use plain JavaScript methods to check if a checkbox or multiple checkboxes on a webpage are checked or not. There’s no need to use any library like jQuery etc. for this purpose. In-fact ...
You can use the JSON.parse() method in JavaScript, to convert a JSON string into a JSON object. JSON is a commonly used data format for exchanging data between a server and web applications. It can be ...
You can use the children property of the getElementById() method in JavaScript to get or extract the unique ids of all the DIV elements inside a DIV element. The “name of the property” itself says ...
We often come across this situation when we want to disable the submit button after clicking it or immediately after submitting the data. You can do this using the “disabled” property in a one-line ...
Unlike HTML form input controls, there is no “disabled” attribute for the A tag. Therefore, simply adding the “disabled” attribute to the link won’t actually disable it. There is a workaround though ...
Let’s assume, I have a number series or a text string and I want to add a dash or hyphen after every 3rd character or simply convert a number like 515458499 to 515-458-499 on my browser. How do I ...
You can add or insert various symbols in your web page using HTML Unicode. Many characters or symbols that you often see in HTML pages have a unique code or a Decimal code. You can easily insert these ...