Tek tıklama ile div gizleme açma kapama. Toggle (Show/Hide) Element

Paylaş.

<html>

<head>

</head>

<body>

<script type=”text/javascript”>
<!–
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == ‘block’)
e.style.display = ‘none’;
else
e.style.display = ‘block’;
}
//–>
</script>

<a href=”#” onclick=”toggle_visibility(‘foo’);”>Click here to toggle visibility of element #foo</a>
<div id=”foo”>This is foo</div>

</body>

</html>

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Tek tıklama ile div gizleme açma kapama. Toggle (Show/Hide) Element, 10.0 out of 10 based on 1 rating