请帮我一个...当页面加载时,如果$Id=pack单选按钮打包为选中和DIV PACK Display:Block;
如果$id =ind,则单选按钮 ind 为选中和DIV ind Display:Block;
<?PHP
$id=$_GET['id'];
?>
<!DOCTYPE>
<html>
<body>
<label>Package</label>
<input type="radio" name="package" value="pack"
<?php if($id=='pack')
{
echo"checked";
echo"<script type=\"text/javascript\">";
echo"document.getElementById(\"package\").style.display=\"block\"";
echo"</script>";
} ?>
>
<label>Individual</label>
<input type="radio" name="package" value="ind"
<?php if($id=='ind')
{
echo"checked";
echo"<script type=\"text/javascript\">";
echo"document.getElementById(\"individual\").style.display=\"block\"";
echo"</script>";
} ?>
>
<div id="package" style=" display:none; height:100px; background-color:#a00; color:#fff;">
Display this div if PACKAGE is checked
</div>
<div id="individual" style=" display:none; height:100px; background-color:#a00; color:#fff;">
Display this div if INDIVIDUAL is checked
</div>
</body>
</html>