Skip to content

Instantly share code, notes, and snippets.

@sc212
Created April 14, 2012 16:03
Show Gist options
  • Save sc212/2385421 to your computer and use it in GitHub Desktop.
Save sc212/2385421 to your computer and use it in GitHub Desktop.
JavaScript:Hidden javascript onclick ad open
<!DOCTYPE html>
<html>
<head>
<title>JavaScript</title>
<script type="text/javascript">
var varname;
function funcname()
{
varname=prompt("Please type a number");
}
onclick = function() {
var chk= document.getElementById('thebutton');
chk.style.display="none";
};
</script>
<style>
#thebutton {
border:none;
background:transparent;
width:100%;
height:1000px;
z-index:1;
position:absolute;
}
</style>
</head>
<body>
<input type="button" id="thebutton" onclick="funcname()" value=""/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment