Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<html>
<body>
        <div class="Area">
            <input type="image" id="Area-Light" src="http://www.psdgraphics.com/file/glossy-light-bulb.jpg" width=200/>
            <p class="imgtxt" ">Area-Light</p>
        <hr/>
</body>
</html>
 
function my_stateButton(   canvasName )
{
    this.canvas = document.getElementById(canvasName);
    this.canvas.onmousedown = function() {
       alert('down');
    };
    
    this.canvas.onmouseup = function() {
        alert('up');  
    };
   console.log('constructing statebutton for id '+canvasName);
    // Do some work
}
var btn1 = new my_stateButton( "Area-Light");         
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
phdphilpro
0viewers