random string generator guid

a nice easy one to generate a random string. i use this one to stop items from caching or you could use it as a guid.

var nocache = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);

Idea: This could also work as a password generator.

test

..

here is the random function code

function random() {
	var random = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
	document.getElementById('random').innerHTML = random;
}

Demo

Other Items in js
Page Views

This page has been viewed 43 times.

Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.

❤👩‍💻🕹