A simple _javascript technique based on JavaScript for random lottery Small program

Source: Internet
Author: User

For the lottery such a small program to use such as vb,delphi tools to achieve the convenience, because I do not install such an application machine, so can only find another way. In order for the lottery to be able to run directly on any machine without configuring the platform, the development tools and compile-run tools can be easily edited (such as text to edit, and the window system's browser can be compiled and run) and decide to try using JavaScript. My research on JavaScript is not deep, usually mainly used for Web site development of data from the client to make effective judgments (based on security considerations, high security requirements of the site to use server-side language to determine the validity of data), involved are the most commonly used methods, functions. Therefore, the following procedures can only be said to be relatively simple, interface effects and functions are very "simple."

The main key point is to take the random number, in the formulation of the number of random numbers in the use of the formula (range limit-range lower than 1) *math.random () + range lower. The following is the source code:

 

Based on JavaScript to achieve a simple random draw small program code to this end, the above code comments write more detailed, there is no understanding of the place to welcome the proposed, cloud Habitat Community Small series will be the first time to answer, thank you for your support cloud Habitat community website.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.