js制作数字软键盘代码
时间:2019-11-15 10:34:19 来源:网络收集 作者:不详 点击:次
源码授权:
免费特效
运行环境:
JS
源码大小:
13 KB
普通会员
原生js制作的数字软键盘代码,一款医疗录生命体征专用的数字键盘,可以提高录入数字的速度。 js代码 <script type="text/javascript" src="keyBoard.js"></script> <script type="text/javascript"> var keyBoard window.onload = function () { // 获取键盘实例 this.keyBoard = getKeyBoard(document.body) // 设置PC显示键盘 this.keyBoard.setPCDisplay(true) } function show(dom,type) { // 设置接收键盘输入的dom,和需要切换焦点的类型 this.keyBoard.setOutput(dom, type) // 显示 this.keyBoard.show() } function showById(domId, type) { // 设置接收键盘输入的domId,和需要切换焦点的类型 this.keyBoard.setOutputById(domId, type) // 显示 this.keyBoard.show() } function showByClass(domClass, type) { // 设置接收键盘输入的domClass,和需要切换焦点的类型 this.keyBoard.setOutputByClass(domClass, type) // 显示 this.keyBoard.show() } </script> |