javascript获取扫描仪扫描数据并执行动作

来源:百度知道 编辑:UC知道 时间:2024/05/22 19:59:38
画面上有10个连续的text,使用扫描仪扫描条行码,扫描的数据会显示到第一个text中,这个时候,我需要自动将光标移到下一个text,如何处理?
注∶需要使用ox0a和ox0d判断。
可是ox0a和ox0d是什麼?

简单
<input type="text" id="id1" onpropertychange="fo(this)">
....
<input type="text" id="idn" onpropertychange="fo(this)">
<script>
function fo(ele){
if(ele.nextSibling){
ele.nextSibling.focus();
}
}
</scrpt>
如果不行,给我发小纸条,肯定可以我试验过了