html代码 画个div和button
js代码
注:jquery的toggle() 方法的作用就是当对象是显示的就隐藏,当是隐藏的则显示。
$(document).ready(function(){ $("#butt").click(function(){ $("div").toggle();});});这是基础性的东西。建议你去学学jquery