HTML 页面中有提供访问权限和撤销访问权限的单选按钮。单击提供访问权限时,它将显示一些选项以从用户处获取值,这在没有蚂蚁问题的情况下工作,与单击撤销访问按钮相同,它将显示一些选项以从用户处获取值。但这里的问题是撤销访问权限也从提供访问单选按钮获取值。知道下面的代码有什么问题吗
<html>
<head>
<script type="text/javascript">
function empty() {
var x;
x = document.getElementById("qx").value;
y = document.getElementById("pwd").value;
if (x == "") {
alert("QX number should not be null");
return false;
};
if (y == "") {
alert("Password should not be null");
return false;
};
}
</script>
<style>
.top {
position: relative;
background-color: #ffffff;
height: 68px;
}
.top1 {
top: 110px;
left: 476px;
position: fixed;
background-color: #ffffff;
height: 70px;
}
</style>
</head>
<body>
<script type="text/javascript">
function displayForm(c) {
if (c.value == "1") {
document.getElementById("provideContainer").style.visibility = 'visible';
document.getElementById("revokeContainer").style.visibility = 'hidden';
} else if (c.value == "2") {
document.getElementById("provideContainer").style.visibility = 'hidden';
document.getElementById("revokeContainer").style.visibility = 'visible';
} else {}
}
</script>
<center>
<font color="green">
<h2>Please Select the below option</h2>
</font><br>
<form>
<input value="1" type="radio" name="formselector" onClick="displayForm(this)"></input>
<font size="3" color="orange">Provide Access</font>
<input value="2" type="radio" name="formselector" onClick="displayForm(this)"></input>
<font size="3" color="orange">Revoke Access</font>
</form>
波斯汪