<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$( "button" ).click(function(){
alert("Thanks for visiting!");
});
});
</script>
<button id="btn1">Button 1</button>