为什么得不到想要的结果呢
<html>
<head>
<script type="text/javascript">
function one(id)
{
if(document.getElementById("choice_key").checked && document.getElementById("choice_CH").checked){
if(id=="choice_CH"){document.getElementById("choice_key").checked=false;document.getElementById("choice_CH").checked=true;}
if(id=="choice_key"){document.getElementById("choice_CH").checked=false;document.getElementById("choice_key").checked=true;}
}
}
function Find(){
if(document.getElementById("choice_key").choiced){
document.getElementById("Fkey").value=document.getElementById("findKeyOrCH").value;
}
if(document.getElementById("choice_CH").choiced){
document.getElementById("Fvalue").value=document.getElementById("findKeyOrCH").value;
}
}
</script>
</head>
<body>
key:<input type="checkbox" id="choice_key" checked="checked" onclick="one(id)">
中文:<input type="checkbox" id="choice_CH" onclick="one(id)">
<input type="text" style="height: 80;width: 300;" id="findKeyOrCH"><!-- 查找的内容输入框 -->
<form action="" id="findForm">
key值为:<input name="value_key" id="Fkey" type="text" value="">
value值为:<input name="value_CH" id="Fvalue"type="text" value="">
</form>
<button onclick="Find()" style="width: 90"></button>
</body>
</html>
<!-- 勾key,和value为不同的框显示 -->