javascript_howto thread: How to hide button
Hello, I think I know the problem:
It's because the button wasn't in a <form>.
But I couldn't test if it works yet.
<head>
<script language="JavaScript">
NN = (document.layers) ? true : false;
IE = (document.all) ? true : false;
function hideMe() {
if (NN) {
document.layers.button1.visibility = "hidden";
}
if (IE) {
document.all.button1.style.visibility = "hidden";
}
}
</script>
</head>
<body>
<form>
<input type="Button" value="Click Me" id="button1" onClick="hideMe()">
</form>
</body>
|





