Demo1: Writing an E-pet's mini-game--from the "in layman's JavaScript"

Source: Internet
Author: User

Requirements background:

After a successful HTML and CSS Web Design conference, the boss summoned you in the office to let you see his latest online invention: IRock. Virtual pets have made a splash in the toy industry, but our test users are not happy with the online pet.

It is obvious that the user sees the stone and naturally wants to see what new and interesting reactions will appear ... But your boss didn't expect to have a "reaction" at all. Now, you have to be responsible for the interactivity of the Irock, the stone will ascend to become a colorful fairy stone, or will be thrown into the garbage can, it's all to see you.

This demo realizes the function:

1. Create a Irock page

2. When the page loads, pop up the Welcome User's window

3. Design JavaScript code: Pop up a personalized welcome message, ask the user's name, let the pet out of a smile

4. Add event handling, when the user clicks on the pet stone, run the code of the third step design

5. Win the boss's Heart O (∩_∩) o~

Demo:

Link: http://pan.baidu.com/s/1o68Apjc Password: q71h

Demo1: Writing an E-pet's mini-game--from the "in layman's JavaScript"

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.