$(document).ready(function(){ var a ="demo_test.asp"; $("button").click(function(){ $.get("demo_test.asp", function(a){ alert(a); }); }); });