High-simulation controllable spring vibrator written in JavaScript

Source: Internet
Author: User

<Div style = "position: absolute; width: 616px; height: 432px; top: 122px; left: 50px" id = "main"> <div style = "position: absolute; width: 616px; height: 407px; top: 0px; left: 3px "id =" po "> <div style =" position: absolute; background-color: # ffffff; width: 1px; height: 70px; top: 206px; left: 52.41% "id =" divMiddle "> <div style =" position: absolute; background-color: #999; width: 292px; height: 30px; color: # Ff3; top: 8px; left:-1px "id =" divM "onclick =" IO () "> after setting, activate the element and click me! </Div> <input style = "width: 100px; height: 25px; top: 220px; left: 500px" id = "back" onclick = "Back () "value =" reactivate an element "type =" button "> activate the element again after running it! <Br/> (!!! If it fails to run after the setting, click (stop now) and then click the element. Do not refresh it any more! It depends on you! Haha !) <Br/> initial speed (unit: pixel/millisecond): <input style = "width: 50px "id =" SI "value =" 30 "type =" text "/> <br/> moving interval (unit: milliseconds): <input style =" width: 50px "id =" T "value =" 15 "type =" text "/> <br/> half-cycle loss (speed) Energy (>-1 ): <input style = "width: 50px" id = "SL" value = "1" type = "text"/> 0 indicates a simple harmonic motion! <Br/> Distance from the start position to the central axis (unit: pixel): <input onblur = "Distance ()" style = "width: 50px "id =" P "value ="-1 "> <br/> <input style =" width: 100px; height: 25px; top: 220px; left: 500px "id =" stop "onclick =" S () "value =" stop now "type =" button "> </div> <br/> <center> If the page cannot be displayed, press Ctrl + F5 to refresh the page, more webpage code: <a href =' http://www.bkjia.com/ '_ Fcksavedurl =' http://www.bkjia.com/ 'Target = '_ blank'> http://www.bkjia.com/ </A> </center>

Tip: the code can be modified before running!

I just learned JavaScript and saw some cool people write a lot of special effects. I also spent a day writing a spring vibrator, which was completely original and did not learn from anyone's code, here I am running my compressed version code (some cards are running on the internet). I will upload the full version and the Code with comments (which is very detailed, the first time I posted code in my blog, it was quite difficult to control! Haha !), There are also experts who don't want to laugh. I am using a very stupid method. There will be new special effects to upload in a few days (this spring is a button special effect on my webpage, my webpage has a lot of special effects. The webpage has not been completed yet. After that, I will send all the original special effects ). Because I am still studying, it may be slow to publish new special effects. Please forgive me! (Let's think about some special effects and give me some inspiration. Haha !)

Source: http://www.cnblogs.com/NONE/

Download the complete source code: 0910231F630.rar

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.