In this post I’m going to share a JavaScript function, if you call it (and assign some number as length of randomized text you want), it will return random text.
Category: HTML5, CSS & JavaScript
JavaScript codes to only accept alphabet letters and numbers from your users
Sometimes we ask our users to type in something and we only accept alphabet numbers and/or letters, so they should not type something like #$%!@$&%(…
How to create an HTML input box with search icon inside it?
We can make an interesting search input by styling it with css, by adding search icon like what we see in this image:
JavaScript Table of Contents Generator
I had a project to create table of contents of huge text files with .html format, it was thousands. Then I’ve developed a JavaScript Table of Contents generator that detect some text to be included as TOC.
Trim a text and show an ellipsis instead full text with CSS
In case we have a div element with fixed width, for example 100 pixels, and we only want to show an excerpt of text instead showing full text, let’s use this simple css trick.
How to use zklevedit (tile and level editor for Phaser)
I’ve created a kind of level and tile editor for making games with Phaser. Please watch my video tutorial about how to use it here:
Phaser basics and useful snippets
Phaser is a really good JavaScript library for creating games that you can play it in web browsers. In this post I’ll share basic stuffs how to use Phaser.
Another Simple JavaScript Encryption
Somebody asked me how to do an encryption just like if we type “a” it should return “d” (3 letters after “a” position).
How to use jQuery to perform a Quick Search
In this post I’m going to share a source code for performing quick search functionality using jQuery.
How to save an image from html5 canvas
With HTML5’s Canvas we can draw nice graphics. But how we can save it as an image? Of course we can right click on the canvas and download that image. But here I’m going to share a script to download it programmatically by a clicking a link.
Toggling visibility of an element with jQuery
By calling .toggle() or .fadeToggle() with jQuery we can toggle visibility of an element easily.
How to make dimmer (appears darker) effect on HTML page
Learn how to make dimmer effect on HTML page to make user focused on a message that we display it on the page.
How to create and remove an HTML element with JavaScript
To create and remove an HTML element with JavaScript, we can simply call these methods respectively: appendChild() and removeChild() after accessing parent element for that new element.
HTML5 & JavaScript Contact Manager
In this video tutorial I’ll demonstrate how to create contact input to submit contact info into JavaScript contact array and how to delete it.
JavaScript simple and basic localization functionality
You want to provide localization capability to your web app? In this tutorial I’ll show you how to do it. Let’s watch this video tutorial and grab the source code below.
Replacing multiple characters case insensitively in JavaScript
By using replace() function on any string variable, we can replace character(s) with another character(s). But by default it will only replace the first occurrence. What if we want to replace all occurrence? Here I’ll show you how.
How to truncate a text with JavaScript
If we have a long long text and we only want to show our users some part of that text, well we need to truncate that text. In this tutorial I will show you how to do that with JavaScript. And here is the source code: <!DOCTYPE html> <html> <head> <title>ZK Tutorials</title> </head> <body> <h1>Truncating…
JavaScript Object and JSON – Convertion from one to another
What is JSON and how to convert JavaScript object into JSON and from JSON to Object. In this tutorial, By calling JSON.parse() and JSON.stringify(), I’ll show you how.
Simple JavaScript Input Validation Tutorial
Make your web forms more secure by validating users input, like only allowing alphabets A to Z and numbers only, etc… Watch this tutorial to know how.
JavaScript text search tutorial
How to search text inside a page or multiple html pages in JavaScript? It’s easy, here I will share how to make it done.