Random Decimals

Discussion in 'HTML & Website Design' started by aprillove83, Jun 5, 2010.

  1. #1
    Hello guys, I know there is a JavaScript function called Math.random() that generates whole numbers.
    In my website, I want to generate numbers with 2 decimal points. They will need to have a max, and a minimum value. For example, 2.20, 3.56, 4.99, 1.62, or 0.99
     
    aprillove83, Jun 5, 2010 IP
  2. unigogo

    unigogo Peon

    Messages:
    286
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You put your question in a wrong place. This is javascript issue, not HTML/CSS.

    Try this code,
     
    unigogo, Jun 5, 2010 IP
  3. aprillove83

    aprillove83 Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the help and I value them.
     
    aprillove83, Jun 7, 2010 IP