Demo
Code
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).keydown(function(event) {
if (event.which ==65) {
$('#butt').click();
}
});
$(document).ready(function(){
$("#butt").click(function()
{
alert('Man');
});
});
</script>
</head>
<body>
<button id="butt" >Press A</button>
</body>
</html>
Code
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).keydown(function(event) {
if (event.which ==65) {
$('#butt').click();
}
});
$(document).ready(function(){
$("#butt").click(function()
{
alert('Man');
});
});
</script>
</head>
<body>
<button id="butt" >Press A</button>
</body>
</html>
Comments
Post a Comment