function show(m){ if($("#"+m).css("display") == "none"){ $("#a"+m).text("点击关闭"); $("#"+m).show(); $("#info"+m).html(getInfo(m)); }else{ $("#a"+m).text("点击查看"); $("#"+m).hide(); } } function getInfo(m){ var str = $.ajax({ url:"area_info_info.PHP?cid="+m,contentType:"application/x-www-form-urlencoded;charset=utf-8",async: false }).responseText; return str; }