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"