JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Web Design 版  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to postflat modego to previous topicgo to next topic
作者 Re:radio button 問題 [Re:newsh]

發文: 11
積分: 0
於 2007-11-21 10:30 user profilesend a private message to usersend email to cw1057reply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Enter value A: <input type="text" id="ida" name="vala" value="0" onkeyup="syncChoice(); "/><br/>
Enter value B: <input type="text" id="idb" name="valb" value="0" onkeyup="syncChoice(); "/><br/>
Greater radio button:
YES<input type= "radio" id="idyes" name="choice" />
NO<input type= "radio" id="idno" name="choice" />

<script type="text/javascript" src="./js/prototype.js"></script>
<script type="text/javascript">
function syncChoice() {
// get value
var aValue = parseInt($F('ida'));
var bValue = parseInt($F('idb'));
// int check
aValue = isNaN(aValue)?0:aValue;
bValue = isNaN(bValue)?0:bValue;
// sync choice
if ((aValue + bValue) > 10) {
$('idyes').checked = true;
$('idno').checked = false;
} else {
$('idyes').checked = false;
$('idno').checked = true;

reply to postreply to post
人氣 標題 作者 字數 發文時間
2881 radio button 問題 newsh 548 2007-11-20 23:47
2751 Re:radio button 問題 cw1057 834 2007-11-21 10:30
» JWorld@TW »  Web Design 版

reply to postflat modego to previous topicgo to next topic
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8