javascript visibility attribute


  Translation results:

English [ˌvɪzəˈbɪləti] US [ˌvɪzəˈbɪlɪti]

n. Visibility; visibility; visible distance; clarity

javascript visibility attributesyntax

Function:Set whether the element is visible.

Syntax: Object.style.visibility=visible|hidden|collapse

javascript visibility attributeexample

<html>
<head>
	<meta charset="utf-8">
<script type="text/javascript">
function changeVisibility()
{
document.getElementById("p1").style.visibility="hidden";
}
</script>

</head>
<body>

<p id="p1">这是一些文本,这是一些文本,这是一些文本,这是一些文本</p>

<form>
<input type="button" onclick="changeVisibility()"
value="Hide paragraph" />
</form>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A