js 获得radio的值
var tmp = document.getElementsByName("foodtype"); for(var i=0; i<tmp.length; ++i) if(tmp.item(i).checked){ alert(tmp.item(i).getAttribute("value")); }
本文来自博客园,作者:hjzqyx,转载请注明原文链接:https://www.cnblogs.com/hujunzheng/p/4167897.html
var tmp = document.getElementsByName("foodtype"); for(var i=0; i<tmp.length; ++i) if(tmp.item(i).checked){ alert(tmp.item(i).getAttribute("value")); }
本文来自博客园,作者:hjzqyx,转载请注明原文链接:https://www.cnblogs.com/hujunzheng/p/4167897.html