1. Home
  2. Computing & Technology
  3. JavaScript

Piano Chord Calculator

2. Obtain the Script

clr gif

The script for the piano calculator is in three parts. The first two parts are code that need to be copied into separate files tha are then linked into the head section of your web page. The first step is to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called keybd.js.

Next select the code from the text box below and copy it into a file called keybd.css.

You next attach these into the head section of your page.

<script type="text/javascript" src="keybd.js">
</script>
<link rel="stylesheet" href="keybd.css" type="text/css" />

The final step is to insert the following code into the body of your web page where you want the keyboard chord calculator to appear:

<div id="keybd"></div>
<noscript><div align="center"><b>The Piano Chord Calculator requires Javascript</b>
You either have Javascript disabled
or the browser you are using does not
support Javascript. Please use a Javascript
enabled browser to access this calculator.</div></noscript>
Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.