Posts from JavaScript

Get the HTML img tag src attribute value in JavaScript

By Faruque Ahamed Mollick

I am sure that you must familiar with the HTML img tag. We all know that using this tag, we can display an image on a web page. All we have to do is just to give the image path ins.... Read More

Get child element in JavaScript HTML DOM

By Faruque Ahamed Mollick

In JavaScript HTML DOM, we can easily get the child element of a parent element using the childNodes property. Suppose we have div element and a child div inside this just like you.... Read More

Get last n items from an array in JavaScript

By Faruque Ahamed Mollick

I am again here with a new JavaScript solution. In this tutorial, you are going to learn how to get last n items from an array in JavaScript programming. For example, suppose you h.... Read More

Remove Duplicate Values from a JavaScript Array

By Faruque Ahamed Mollick

In this tutorial, you will see how to remove duplicate values from a JavaScript array with simple and quick examples of JS code. First of all, I would like to let you know that, th.... Read More

Send POST data in JavaScript using XMLHTTPRequest

By Faruque Ahamed Mollick

On the web, it is often necessary to send HTTP requests with post data. In this article, you will learn how to send post data in JavaScript using the XMLHTTPRequest object. The XML.... Read More

JavaScript mousemove Event | Execute on moving mouse pointer

By Faruque Ahamed Mollick

The JavaScript mousemove event executes when the mouse pointer moves over an element. With onmousemove event, we can execute our JavaScript code on moving the mouse pointer. Every .... Read More

Convert comma separated string to an array in JavaScript

By Faruque Ahamed Mollick

In this article, you are going to learn how to convert a comma separated string into an array in JavaScript. All the elements of our array will hold the items separated by commas. .... Read More

JavaScript string replace() method | Replace string part

By Faruque Ahamed Mollick

JavaScript has an in-built string.replace() method that is used to replace part of any given string with another string or a regular expression. Here, we just have to pass a value .... Read More