<html>
<head>
</style>
</head>
<body>
<span id="txt">I am visible</span><br>
<span id="btn">hide</span>
<script>
btn.onclick=function(){
if(/\*+/.test(txt.innerHTML)) {txt.innerHTML="I am visible"; this.innerHTML="hide"; return}
txt.innerHTML="*********"; this.innerHTML="show"
}
</script>
</body>
</html>