function find(){
if(document.getElementById("radio1").checked )
{
location.href = "Aaction";
}if(document.getElementById("radio2").checked )
{
location.href = "Baction";
}if(document.getElementById("radio3").checked )
{
location.href = "Caction";
}
}
(查看)(删除)(修改)(新增)
------------------
A B C D E F
------------------
(radio) 0 3 3 4 4 3
------------------
(radio) 1 3 4 5 4 3
------------------
(radio) 2 1 1 5 4 3
------------------ 上面是四个按钮,(radio)是用来选择这条纪录的按钮,当点中这个(radio)时,获得这条纪录的Id,然后点击查看,
查看时,根据A值的不同,跳转到不同的action。
<input id="radio1" type="radio" alt="id" />var oRadio1 = document.getElementById('radio1');
switch(oRadio1.id){
case "0":
location.href = "Aaction";
break;
case "1":
location.href = "Baction";
break;
case "2":
location.href = "Caction";
break;
}
<input id="radio1" type="radio" alt="id" />var oRadio1 = document.getElementById('radio1');
switch(oRadio1.alt){
case "0":
location.href = "Aaction";
break;
case "1":
location.href = "Baction";
break;
case "2":
location.href = "Caction";
break;
}