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
julie asked 4 weeks 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
Mikhail answered 4 weeks ago
Your Answer

12 + 5 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com