标题:关于radio与label问题联动问题
只看楼主
qinyun
Rank: 1
等 级:新手上路
帖 子:46
专家分:0
注 册:2008-6-6
结帖率:20%
已结贴  问题点数:10 回复次数:3 
关于radio与label问题联动问题
这个代码如果要将英文部份radio改成label(改变其字体大小)怎么联动呢(注意要是在radio状态改变时不能onClick时)
程序代码:
<script type=[color=#800000]"text/javascript">
function copySelect(ooxx) {
        document.getElementById(ooxx + "_en").checked = "true";
}
</script>
</head>
<body>
<div>
<form action="" method="post">
        <p>
          <input type="radio" id="bj" name="address" checked="checked" onClick="copySelect('bj')" />
          北京
          <input type="radio" id="shh" name="address" checked="checked" onClick="copySelect('shh')" />
          上海
          <input type="radio" id="tj" name="address" checked="checked" onClick="copySelect('tj')" />
          天津
       
          <br />
          <br />
          <input type="radio" id="bj_en" name="address_en" checked="checked" />
          BeiJing
          <input type="radio" id="shh_en" name="address_en" checked="checked" />
          ShangHai
          <input type="radio" id="tj_en" name="address_en" checked="checked" />
          TianJin         
          <br />
          <br />&nbsp;&nbsp;&nbsp;
          <label>BeiJing</label>&nbsp;&nbsp;&nbsp;&nbsp;
          <label>ShangHai</label>&nbsp;&nbsp;&nbsp;&nbsp;
          <label>TianJin</label>
         
</form>

[/color]
搜索更多相关主题的帖子: label radio 
2010-08-21 23:57
qinyun
Rank: 1
等 级:新手上路
帖 子:46
专家分:0
注 册:2008-6-6
得分:0 
哪位高手能帮看一下吗
2010-08-22 15:01
wangjy500
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:13
帖 子:457
专家分:2569
注 册:2010-7-11
得分:10 
意思说清楚点。如何联动?

QQ:63572063
2010-08-22 15:11
wangjy500
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:13
帖 子:457
专家分:2569
注 册:2010-7-11
得分:0 
<script type="text/javascript">
function copySelect(ooxx) {
        document.getElementById(ooxx + "_en").checked = "true";
        document.getElementById("bj_lab").style.fontSize = "16px";
        document.getElementById("shh_lab").style.fontSize = "16px";
        document.getElementById("tj_lab").style.fontSize = "16px";
        document.getElementById(ooxx + "_lab").style.fontSize = "38px";
}
</script>
</head>
<body>
<div>
<form action="" method="post">
        <p>
          <input type="radio" id="bj" name="address" onMouseUp="copySelect('bj')" />
          北京
          <input type="radio" id="shh" name="address" onMouseUp="copySelect('shh')" />
          上海
          <input type="radio" id="tj" name="address" onMouseUp="copySelect('tj')" />
          天津
      
          <br />
          <br />
          <input type="radio" id="bj_en" name="address_en" />
          BeiJing
          <input type="radio" id="shh_en" name="address_en"/>
          ShangHai
          <input type="radio" id="tj_en" name="address_en"/>
          TianJin         
          <br />
          <br />&nbsp;&nbsp;&nbsp;
          <label id="bj_lab">BeiJing</label>&nbsp;&nbsp;&nbsp;&nbsp;
          <label id="shh_lab">ShangHai</label>&nbsp;&nbsp;&nbsp;&nbsp;
          <label id="tj_lab">TianJin</label>
         
</form>
你是不是要想这种效果?

[ 本帖最后由 wangjy500 于 2010-8-22 15:35 编辑 ]

QQ:63572063
2010-08-22 15:19



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-316441-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.371042 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved