How to make a simple Random String shortcode?
-
Hi,
i want to make a shortcode which displays a random string. i found some javascripts which they do that… (or php is better?) but i dont know how to convert them to shortcodes…
i’m sure lot of pro people know it easily… thanks!
here is my code: (u have better idea? do it!)<script language="javascript" type="text/javascript"> function makeid() { var text = ""; var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for( var i=0; i < 5; i++ ) text += possible.charAt(Math.floor(Math.random() * possible.length)); return text; } </script>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to make a simple Random String shortcode?’ is closed to new replies.