Onload random number generator

I was created onload random number generater with javascript .but I want to create … that function. … add +1 in onload random number generater when click on button

function fun1(){ 
      var minNumber = 600;
      var maxNumber = 2000;
      var randomnumber = Math.floor(Math.random() * (maxNumber + 1) + minNumber);
      document.getElementById("view").innerHTML = randomnumber;
      return false;

var addFunctionOnWindowLoad = function(callback){

  1. Are you wanting the page to load with a random number, and then have a visitor click a button to increase that number by one each time that button is clicked?

  2. Why?

Because I want add a function like button in my Android app project

If the numbers are random, how will you know exactly how many likes you are getting? Shouldn’t you start with 0?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.