Skip to content

Instantly share code, notes, and snippets.

@easonhan007
Created May 12, 2013 08:53
Show Gist options
  • Save easonhan007/5562884 to your computer and use it in GitHub Desktop.
Save easonhan007/5562884 to your computer and use it in GitHub Desktop.
js控制显示和隐藏
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>显示和隐藏</title>
<script type="text/javascript">
function show(){
document.getElementById('show').style.display = "block"
}
</script>
</head>
<body>
<a href="javascript:;" onclick="show()" >显示</a>
<p style="display:none " id="show" >你好,html</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment