我有一个 div 和一个链接。因此,当我单击链接时,它应该向我显示 div。但现在的问题是,我只看到 div 一秒钟,然后 div 再次隐藏。
为什么?
...
<div id = 'zuordnen'>
test
</div>
...
echo "<a href = '' ><img src = './images/zuordnen_menu.png' border=0 style =' width:1vw; height: 2vh;' onClick = 'showzuordnen();'></a> ";
JAVASCRIPT:
function showzuordnen()
{
document.getElementById("zuordnen").style.visibility = "visible";
}
CSS:
#zuordnen {
z-index: 1;
position: absolute;
width: 20px;
height: 6vh;
border: 1px solid #ff0000;
left: 20px;
visibility: hidden;
}