试试这个:
$(function(){ $("#MyButton").click(function(e){ e.preventDefault(); $(".SlidingDiv").slideDown(function(){ // Callback function - will occur when sliding is complete. $("#MyInput").focus(); }); }); });