$(document).ready(function(){ $('#btn1').click(function(){ alert($("#text").text()); }); });