我在python中有一个项目,当我的图标被单击时,它会隐藏一个div,然后再次单击时它会崩溃。现在我有下面的html代码
<img scr="/path/to/img"></img>
<div>
<p>Press the icon to see more stuff</p>
</div>
<div id="showOrHide" style="display: none;">
<p>one</p>
<p>two</p>
<p>three</p>
</div>
所以我的问题是,当用户单击图像时,删除id为showOrHide的div上的样式的最佳方法是什么?你知道吗
谢谢!你知道吗
Python并不是最好的工具来完成你想要完成的任务——难道没有办法使用Javascript吗?一个简单的
onclick()
http://www.w3schools.com/jsref/event_onclick.asp将在JS中完成这项工作。你知道吗相关问题 更多 >
编程相关推荐