点击按钮id="buttonA";
弹出层 id="divcontent"
事件onclik 函数 showandhide
<button id="buttonA" οnclick="showandhide()"></button>
function showandhide(){
if($("#divcontent").css("display")=="none"){//隐藏
$("#divcontent").show();
}
else{
$("#divcontent").hide();
}
}