Maaung gabie.. gusto tana nku na makita ang ako login form na kung e check ang checkbox pero dili man mu gana ako code.. unsa mali ani?
HTML
<html>
<head>
<title>Login Form</title>
<link href="myStyle.css" rel="stylesheet" type="text/css" />
<script src="myJScript.js" type = "text/javascript"></script>
</head>
<body>
<div id ="wrapper">
<p id = "text">LOGIN<input type = "checkbox" name = "hideForm" id = "hideForm" tabindex = "165"/></p>
<div id = "hiddenForm">
<form id="frmContact" name="frmContact" method="post" action="thanks.htm">
<fieldset id = "personalInfo">
<p>
<label>Username</label>
<input type = "text" id = "text" tabindex = "100">
</p>
<p>
<label>Password</label>
<input type = "password" id = "text" tabindex = "100">
</p>
</fieldset>
</form>
</div>
</div>
<script src="myJScript.js"></script>
</body>
</html>
Javascript
function prepareLoginForm() {
document.getElementById("hideForm").onclick = function() {
if(document.getElementById("hideForm").checked) {
document.getElementById("hiddenForm").style.displa y = "block";
} else {
document.getElementById("hiddenForm").style.displa y = "none";
}
};
document.getElementById("hiddenForm").style.displa y = "none";
}
window.onload = function() {
prepareLoginForm();
};
Salamat daan!