goods_a.onclick=function(event){ e =event|| window.event; target=event.target || e.srcElement; if(target.nodeName.toLowerCase()=='section'){ target.className='currentP'; } } goods_a.onmouseout=function(event){ e =event|| window.event; target=event.target || e.srcElement; if(target.nodeName.toLowerCase()=='section'){ target.className='smallP';![圖片描述][2] } }
點擊小div后渲染成中div且下方的粉色div也要變換樣式和內容;問題:用事件委托時,點擊到div中
牛魔王的故事
2018-11-06 16:15:19