Question and answer is powered by AnsPress.io
How can I generate unique id using javascript? I want to generate dynamically id using JavaScript and generated id must be unique. How can I do?
Apply this example code to generate unique id using javascript:
<script type=”text/javascript”>
var uniqid= Math.floor(Math.random() * 1000000);
alert(uniqid);
</script>