If you just want to do a simple page load, you could just do: $('#btn2').mouseup(function(){ $("#xml").load("time1.asp"); };
<input type="button" id="btn2" value="Just a test" /> Or your version: $('#btn2').mouseup(function(){ $("#xml").ajax({ url: "time1.asp", async: false }).responseText; }; <input type="button" id="btn2" value="Just a test" /> Ducular chen wrote: > > just like the title,my test: > function ajax1() > { > var html = $.ajax({ url: "time1.asp", async: false }).responseText; > $("#xml").html(html); > > } > > always throw a error! > <input type="button" id="btn2" onclick="ajax1()" value="Just a test" /> > and anybody could give me same good website for jquery study??Thx! > -- View this message in context: http://www.nabble.com/I-need-ge-simple-demo-for-%24.ajax-and-events-function-tf3412878.html#a9510216 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/