用于更改html di样式的Python按钮

2024-09-30 01:19:23 发布

您现在位置:Python中文网/ 问答频道 /正文

我在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上的样式的最佳方法是什么?你知道吗

谢谢!你知道吗


Tags: thetopath项目代码dividimg

热门问题