我想在单击单选按钮时隐藏我的 div,但我一生都无法弄清楚。这是我的代码:
<li>
Residential
<input type="radio" name="fee" id="residential" class="app_fee"
value="<?php echo "$applicationFee_residential" ?>"
onChange="mech_application.fee1.value = eval(mech_application.residential.value)"
<?php if (isset($_POST['fee'])) {
print($residentialYes ? "CHECKED" : "");
} ?> />
</li>
<li>
Apartment/Commercial
<input type="radio" name="fee" id="apartment" class="app_fee"
value="<?php echo "$applicationFee_Apartment" ?>"
onChange="mech_application.fee1.value = eval(mech_application.apartment.value)"
<?php if (isset($_POST['fee'])) {
print($apartmentNo ? "CHECKED" : "");
} ?> />
</li>
<li>
Revision
<input type="radio" name="fee" id="revision" class="app_fee"
value="<?php echo "$revision" ?>"
onChange="mech_application.fee1.value = eval(mech_application.revision.value)"
<?php if (isset($_POST['revision'])) {
print($revisionYes ? "CHECKED" : "");
} ?> />
<?php if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (!isset($_POST['fee'])) {
$problem = TRUE;
print '<p class="error">Please select the application type</p>';
$error = TRUE;
}
}?>
</li>
我想在 Residential 或 Apartment 或单击时隐藏此 div,并在单击修订时显示它:
<div class="revision_hidden">
Application ID:
<input type="text" name="revision_application_id" size="12" maxlength="40"
value="<?php if (isset($_POST['revision_application_id'])) {
print htmlspecialchars($_POST['revision_application_id']);
} ?>"
placeholder="Application ID"/>
</div>
任何和所有的帮助表示赞赏!谢谢!