document.getElementById('outer-container').onclick = function(e) { if(e.target != document.getElementById('content-area')) { document.getElementById('content-area').innerHTML = 'You clicked outside.'; } else { document.getElementById('content-area').innerHTML = 'Display Contents'; }}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)