Try to search your question here, if you can't find : Ask Any Question Now ?

Number generation between 1 – 100 in JavaScript using JQuery

HomeCategory: stackoverflowNumber generation between 1 – 100 in JavaScript using JQuery
Avatarjulie asked 4 months ago

I have encountered a small issue in my code I need my code to generate a number between 1-100 which it does however, I need for it to generate a unique number between 1-100 I have included my code below. Thanks in advance.

<!DOCTYPE html>

<html>

<body>
<p id="number"> </p>
<button id="button"  onclick= "random();"> Get Number </button>
</body>

<script>
function random() {
    document.getElementById("number").innerHTML = 
Math.floor(Math.random()* 100);
 }



</html>
1 Answers
Best Answer
AvatarMikhail answered 4 months ago
Your Answer

4 + 20 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com