Skip to content

Instantly share code, notes, and snippets.

@sc212
Created April 17, 2012 06:57
Show Gist options
  • Save sc212/2404074 to your computer and use it in GitHub Desktop.
Save sc212/2404074 to your computer and use it in GitHub Desktop.
JavaScript: Hidden ad final
<!DOCTYPE html>
<html>
<head>
<title>JavaScript</title>
<script type="text/javascript">
var varname;
function funcname()
{
document.location.href="http://www.google.com";
}
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