Easy Code Share >

WebSocket Push Message to a Specific Client in Html

WebSocket Push Message to a Specific Client in Html

Unlike HTTP servers, WebSocket servers can push a message to a specific client in Html and JavaScript. The feature is valuable for many applications such as web chatting. This article starts from WebSocket basics that introduces the way how clients and servers talk. Subsequently, the demo example uses NodeJS to build a server that manages … Read more

Easy Code Share >

JavaScript Text to Speech Using Synthesis API

JavaScript Text to Speech Using Synthesis API

Friendly human interfaces sometimes require machine-generated voices. And Text-to-Speech technology in JavaScript can implement the requirement very well. When web pages read texts aloud like robots, people are just listening machine’s reporting without looking at screen monitors or mobile devices. The speech synthesis API provides the simplest way to create browser-based web pages capable of … Read more

Easy Code Share >

JavaScript Speech Recognition for Beginners

JavaScript Speech Recognition for Beginners

Sometimes, people require Speech-to-Text (STT) technique to make machines recognize oral commands. Now, we are introducing the simplest way to speech recognition in JavaScript. This tutorial is for beginners. It helps you create web pages recognizing what people talk by using Web Speech API services. All codes here are not complicated, so you can easily … Read more

Easy Code Share >

JavaScript Redirect POST Request Without Data Limit

JavaScript Redirect POST Request Without Data Limit

Rather than AJAX staying in the same HTML, sometimes, developers have to redirect to different URL using POST requests. We provide tricky JavaScript codes to redirect a POST request with no parameters limit. Comparison with GET request method are given in the example, too. All codes here are not complicated, so you can easily understand … Read more

Easy Code Share >

How Cordova Geolocation Locate Google Map in APP

How Cordova Geolocation Locate Google Map in APPs

Cordova Geolocation gets latitude, longitude, and even altitude. It is enough to locate you on Google Maps. Cordova let you use JavaScript to reach the goal in mobile phones, instead of native codes on Android or iOS. The article guide you to go through Cordova project building process for an example about GPS locating and … Read more

Easy Code Share >

Using 3 Events to Sign a Signature on HTML5 Canvas

Using 3 Events to Sign a Signature on HTML5 Canvas

You can sign a signature on HTML5 Canvas by moving mouses. Listening to 3 mouse events, we discover a straight-forward and event-driven approach to do it. Furthermore, you can save your signature as an image file. All codes here are not complicated, so you can easily understand even though you are still students in school. … Read more

Easy Code Share >

7 Steps for HTML Bar Chart Using Javascript Canvas

HTML Canvas Bar Chart using Javascript by 7 Steps

This article offers a complete approach of building a HTML bar chart using JavaScript canvas. In 7 steps, you can customize your bar chart with designed bar colors and the legend to distinguish them. More than one series of data can be set in the chart. Essentially, the JS object is truly in clear codes … Read more

Easy Code Share >

HTML5 Canvas Line Chart using Javascript by 7 Steps

HTML5 Canvas Line Chart using Javascript by 7 Steps

We are proposing an elegant approach to draw HTML5 Canvas line chart. Each line illustrates the distribution of one series of data, and we allow multiple series to be sketched. This article divides the drawing procedure into 7 steps for which several sections explain the principle and usage. All codes here are not complicated, so … Read more

Easy Code Share >

How to Store JSON Array in HTML Attribute and Get it

How to Store JSON Array in HTML Attribute and Get it

You can store JSON object or JSON array into an attribute on an HTML element, just as you treat them as strings. This article teach you how to embed JSON data in HTML, and moreover, retrieve it from HTML attributes. Along with this major topic, an extra tip about toggling to hide or show some … Read more