<div class="" style="margin-bottom:0px;position:relative;margin-left:8px;">
<div id="checkDiv1" style="display: inline-block; height: 30px; line-height: 30px; vertical-align: central;" οnclick="check(this)">
<input type="checkbox" checked="checked" style="width:14px;height:14px;top:3px;position:relative;" id="HDCode" /><label style="margin-left:3px;">1单号</label>
</div>
<div id="checkDiv2" style="display:inline-block;margin-left:10px;" οnclick="check(this)">
<input type="checkbox" style="width: 14px; height: 14px; top: 3px; position: relative;" id="PCCode" /><label style="margin-left:3px;">2单号</label>
</div>
<div id="checkDiv3" style="display:inline-block;margin-left:10px;" οnclick="check(this)">
<input type="checkbox" style="width: 14px; height: 14px; top: 3px; position: relative;" id="NoJXS" /><label style="margin-left:3px;">3单号</label>
</div>
</div>
<script>
var iptValue = document.getElementById("workCode");//input输入框
//复选框
var checkbox1 = document.getElementById("HDCode");
var checkbox2 = document.getElementById("PCCode");
var checkbox3 = document.getElementById("NoJXS");
//复选框选中取消
function check(obj) {
if (obj.id == "checkDiv1" && checkbox1.checked == true) {
pocCode.setAttribute("placeholder", '合单单号')
checkbox2.checked = false;
checkbox3.checked = false;
iptValue.value = "";
iptValue.focus();
}
else if (obj.id == "checkDiv2" && checkbox2.checked == true) {
pocCode.setAttribute("placeholder", '波茨号')
checkbox1.checked = false;
checkbox3.checked = false;
iptValue.value = "";
iptValue.focus();
} else if (obj.id == "checkDiv3" && checkbox3.checked == true) {
pocCode.setAttribute("placeholder", '单号')
checkbox1.checked = false;
checkbox2.checked = false;
iptValue.value = "";
iptValue.focus();
}
}
</script>