<input type="radio" value="套装条码摇奖" checked name="khnl">套装条码摇奖
<input type="radio" value="洗车卡号码摇奖" name="khnl">洗车卡号码摇奖选择其中一个洗车卡号码摇奖,页面下面的<input type="radio" value="上半月" <%If jxqj="上半月" then%>checked<%End if%> name="jxqj">上半月&nbsp;
<input type="radio" value="下半月" <%If jxqj="下半月" then%>checked<%End if%> name="jxqj">下半月&nbsp;
<input type="radio" value="全月" <%If jxqj="全月" then%>checked<%End if%> name="jxqj">全月只显示  <input type="radio" value="全月" <%If jxqj="全月" then%>checked<%End if%> name="jxqj">全月其它两个不显示 
这么实现?   谢谢

解决方案 »

  1.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
        <script type="text/javascript">
    $(function(){
    $("input:radio[name='khnl']").click(function(){
    $("#itemlist").empty();
    $("#itemlist").append("<input type='radio' value='全月'  name='jxqj'>全月");
    })
    })    </script>
    </head>
    <body>
    <input type="radio" value="套装条码摇奖" name="khnl" checked="checked">套装条码摇奖
    <input type="radio" value="洗车卡号码摇奖" name="khnl">洗车卡号码摇奖
    <hr />
    <div id="itemlist">
    <input type="radio" value="上半月"  name="jxqj">上半月&nbsp;
    <input type="radio" value="下半月"  name="jxqj">下半月&nbsp;
    <input type="radio" value="全月"  name="jxqj">全月
    </div>
    </body>
    </html>
      

  2.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script type="text/javascript">
    window.onload = function() {
    var obj = document.getElementsByName('khnl');
    var obj_jxqj = document.getElementsByName('jxqj');
    for (var i = 0; i < obj.length; i ++) {
    obj[i].onclick = function() {
    for (var j = 0; j < obj_jxqj.length; j ++) obj_jxqj[j].parentNode.style.display = '';
    if (this.value == '洗车卡号码摇奖') {
    obj_jxqj[0].parentNode.style.display = 'none';
    obj_jxqj[1].parentNode.style.display = 'none';
    obj_jxqj[2].checked = true;
    }
    }
    }
    }
    </script>
    </head><body>
    <input type="radio" value="套装条码摇奖" checked name="khnl">套装条码摇奖
    <input type="radio" value="洗车卡号码摇奖" name="khnl">洗车卡号码摇奖<span><input type="radio" value="上半月" name="jxqj">上半月&nbsp;</span>
    <span><input type="radio" value="下半月" name="jxqj">下半月&nbsp;</span>
    <span><input type="radio" value="全月" name="jxqj">全月</span>
    </body>
    </html>