Javascript visible hide hyperlink
My friend asked me to write javascript that will hide itself by clicking on it and will be visible after 5 second
here is simple code to reffer
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script>
function xxx(a)
{
a.style.visibility="hidden";
window.setInterval("visible()",5000);
}
function visible()
{
document.getElementById('p').style.visibility="visible";;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<a href="#" onclick=xxx(this); id="p" >click to disable</a>
</div>
</form>
</body>
</html>
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5