单选按钮选中/取消
<script type="text/javascript">
let b1=0;//定义变量b
function select1(){
b1++;
if (b1%2==0){
document.getElementById("gouxuan1").style.background = "url(image/queren1.png)";
document.getElementById("gouxuan1").style.backgroundRepeat="no-repeat";
document.getElementById("gouxuan1").style.backgroundSize="0px 0px";
document.getElementById("gouxuan1").style.backgroundPosition="center center";
}else {
document.getElementById("gouxuan1").style.background = "url(image/queren.png)";
document.getElementById("gouxuan1").style.backgroundRepeat="no-repeat";
document.getElementById("gouxuan1").style.backgroundSize="20px 20px";
document.getElementById("gouxuan1").style.backgroundPosition="center center";
}
}
</script>
<div name="T_div1" class="T_div1" onclick="select1()">
<p class="p3">全国</p>
<img class="img2" src="image/icon-zbsmalt.png">
<p class="p1">11111</p>
<span>最高可贷<b>300</b>万</span>
<p class="p2" style="color:#79AABB">利率低 纯信用 可循环</p>
</div>