JavaScript Basics-Common control event handling

Source: Internet
Author: User

(1) Mouse events-onmouseover, onmouseout

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7F/7C/wKiom1cgPwORA9GvAAApuorwRF0298.png "title=" Qq20160427122247.png "alt=" Wkiom1cgpwora9gvaaapuorwrf0298.png "/>

(2) text box get focus, lose focus event-onfocus, onblur

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/79/wKioL1cgQLih9Ig9AAAfIjpQ2y8915.png "title=" Qq20160427122632.png "alt=" Wkiol1cgqlih9ig9aaafijpq2y8915.png "/>

(3) Radio box-radio

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7F/7C/wKiom1cgQHGA-SJ-AAAfVY_kJyc927.png "title=" Qq20160427122923.png "alt=" Wkiom1cgqhga-sj-aaafvy_kjyc927.png "/>

(4) Calculate the circumference and area of the circle-onclick

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/79/wKioL1cgQbvCtCTsAAAdfYktqd8000.png "title=" Qq20160427123201.png "alt=" Wkiol1cgqbvctctsaaadfyktqd8000.png "/>

(5) Calculate total and average score-parseint

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/7C/wKiom1cgQYeQGqN1AAAkW9MR1UY577.png "title=" Qq20160427123437.png "alt=" Wkiom1cgqyeqgqn1aaakw9mr1uy577.png "/>

(6) Recommended shopping cart-parseint, parsefloat

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7F/7C/wKiom1cgQ6Xho9F5AAAq29WOhIk911.png "title=" Qq20160427124220.png "alt=" Wkiom1cgq6xho9f5aaaq29wohik911.png "/>

(7) Calculate leap year-onclick

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7F/79/wKioL1cgROHTCyVIAAAi1hA5ZLU951.png "title=" Qq20160427124552.png "alt=" Wkiol1cgrohtcyviaaai1ha5zlu951.png "/>

(8)

JavaScript Basics-Common control event handling

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.