.::AGNA::.

Advertisement

.::AGNA::.

Advertisement

کد بیان سن به صورت هفته - روز - ثانیه و ...

Description: Use this script to find out precisely how old you are, in various units!

Example:

D.O.B Yr Mon Day Hr Min Sec
Accurate Normal
  • .
  • I Am... ...Years Old
  • .
  • Or... ...Days Old
  • .
  • Or... ...Hours Old
  • .
  • Or... ...Minutes Old
  • .
  • Or... ...Seconds Old

    Directions

    Step 1: Insert the below into the <head> section of your page:

    Step 2: Insert the below into the <body> section (where you wish the script to appear):

    کد جاوایی که ۵۰در صد وبلاگ های خارجی گذاشتن

    Description: A useful utility that rounds any number to the specified decimal place. This is needed because JavaScript doesn't have any built-in methods for the task. The function takes two parameters- a number (has to be a number datatype), and the number of places to round it to.

    Example: n/a

    Directions: Add this script to your page:

    To round numbers using it, simply invoke the function:

    roundit(78.4333, 2)

    where the first parameter (78.4333) is the number to round, and the second (2), the number of decimals to round it to. For example, the following alerts this processed number:

    <script>
    //alerts 78.43
    alert(roundit(78.4333,2))
    </script>