<div id="text"></div>

<input type="button" onclick="display(\'text\')" />
function $_(id){
return document.getElementById(id);
};
function display(x){
$(x).style.display=($(x).style.display=="none")?"":"none";
};

版权声明:本文为archrjoe原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/archrjoe/archive/2012/02/08/2343069.html