87,910
社区成员
发帖
与我相关
我的任务
分享
Me.txtSYONIN_BI_S.Attributes.Add("onfocus", "this.select(); GetFocusId('SYONIN_BI_S'); return false;")
Me.rdb_1.Attributes.Add("onfocus", "this.select(); GetFocusId('SYONIN_BI_S'); return false;")
<html>
<head>
<script language="javascript">
function focusRadAndCbo()
{
document.getElementById("rdId2").checked = true;
document.getElementById("rdId2").focus();
document.getElementById("ckId3").checked = true;
document.getElementById("ckId3").focus();
}
</script>
</head>
<body onload="focusRadAndCbo()">
<form>
<input type="radio" name="rad" id="rdId1" onfocus="alert(this.name+':'+this.id)">1
<input type="radio" name="rad" id="rdId2">2
<input type="radio" name="rad" id="rdId3" onfocus="alert(this.name+':'+this.id)">3
<br><br>
<input type="checkbox" name="cbo" id="ckId1" onfocus="alert(this.name+':'+this.id)">1
<input type="checkbox" name="cbo" id="ckId2" onfocus="alert(this.name+':'+this.id)">2
<input type="checkbox" name="cbo" id="ckId3">3
</form>
</body>
</html>
<html>
<head>
<script language="javascript">
[code=JScript]
function focusRadAndCbo()
{
document.getElementById("rdId2").checked = true;
document.getElementById("rdId2").focus();
document.getElementById("ckId3").checked = true;
document.getElementById("ckId3").focus();
}