When I want to hide a HTML , I use the following JavaScript code: var div = document.getElementById(\'myDiv\'); div.style.visibility 相关标签:
, I use the following JavaScript code: var div = document.getElementById(\'myDiv\'); div.style.visibility 相关标签:
var div = document.getElementById(\'myDiv\'); div.style.visibility
If you want the element to keep its space then you need to use,
$('#myDiv').css('visibility','hidden')
If you dont want the element to retain its space, then you can use,
$('#myDiv').css('display','none')
or simply,
$('#myDiv').hide();