html部分
<div id="box">
<div >账户余额 <em id="box_title" style="font-size: 12px">显示余额</em></div>
<div id="box_content" style="display: none">¥<em>1999</em></div>
</div>
js部分
<script type="text/javascript">
window.onload = function(){
document.querySelector("#box_title").addEventListener("click",function(){
var o = document.querySelector("#box_content")
if(o.className == '') {
o.style.display = 'block';
o.className = 'active';
}else{
o.style.display = 'none';
o.className = '';
}
},false);
}
</script>