js取消单选按钮选中示例代码


一组单选按钮name都为country
复制代码 代码如下:

var country = document.getElementsByName('country');
for(var i=0;i<country.length;i++){
if(country[i].checked)
{
country[i].checked=false; //不选中
}
}

« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3