利用jQuery实现底部弹出虚拟键盘代码



如需定制开发(网站开发、二次开发)在线咨询,请点击>> QQ:753511799

71 282 95



特效描述:利用jQuery实现 底部弹出 虚拟键盘代码。利用jQuery实现底部弹出虚拟键盘代码

代码结构

1. 引入CSS

<link rel="stylesheet" href="css/mathquill.css">
<link rel="stylesheet" href="css/keyboard.css">

2. 引入JS

<script src="js/jquery.min.js"></script>
<script src="js/jquery.slimscroll.min.js"></script>
<script src="js/chinese-pynsimpl.js"></script>
<script src="js/mathquill.min.js"></script>
<script src="js/keyboard.js"></script>

3. HTML代码

<div class="my_box answer_lists">
    <ul>
        <li>
           点击下方,横线部分输入信息!
            <p></p>
        </li>
    </ul>
</div>
<div class="input_box js_math">
    <div class="mask"></div>
    <div class="input_con">
        <div class="txt_area clear">
            <div  id="txt_latex"  class="input_cur input_latex l"></div>
            <div class="btn_box">
                <input type="button" value="清空" onClick="clearValue();">
                <input type="button" value="确定" class="addlatex btn_ok">
            </div>
        </div>
        <div class="change_box clear">
            <div class="l change_btns active" data-type="zimu">英文</div>
            <div class="l change_btns" data-type="zhongwen">中文</div>
            <div class="l change_btns" data-type="shuzi">123</div>
            <div class="l change_btns" data-type="fuhao">符号</div>
            <div class="l change_btns" data-type="gongshi">公式</div>
            <div class="l change_btns" >手写</div>
            <div class="l close_keyborad"></div>
        </div>
        <div class="keyboard_box">
            <div class="prettyprint"></div>
            <div class="softkeyboard"  name="softkeyboard">
                <div class="c_panel shuzi" id="shuzi">
                    <table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('0');" value=" 0 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('1');" value=" 1 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('2');" value=" 2 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('3');" value=" 3 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('4');" value=" 4 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('5');" value=" 5 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('6');" value=" 6 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('7');" value=" 7 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('8');" value=" 8 "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('9');" value=" 9 "></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_num" type="button" value="." onClick="addValue('.');"></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('①');" value=" ① "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('②');" value=" ② "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('③');" value=" ③ "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('④');" value=" ④ "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('⑤');" value=" ⑤ "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('⑥');" value=" ⑥ "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('⑦');" value=" ⑦ "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('⑧');" value=" ⑧ "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('⑨');" value=" ⑨ "></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('+');" value=" + "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('-');" value=" - "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('*');" value=" * "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('');" value=" / "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('=');" value=" = "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('<');" value=" < "></td>
                            <td><input class="i_button i_button_num" type="button" onClick="addValue('>');" value=" > "></td>
                            <td><input class="i_button i_button_num" type="button" value="删除" onClick="backspace();"></td>
                            <td><input class="i_button i_button_num" type="button" onClick="clearValue();" value="清空"></td>
                            <td><input class="i_button i_button_num" onClick="changePanl('zimu');" type="button" value="返回"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="c_panel zimu" id="zimu" >
                    <table align="center" width="98%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('q');" value=" q "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('w');" value=" w "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('e');" value=" e "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('r');" value=" r "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('t');" value=" t "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('y');" value=" y "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('u');" value=" u "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('i');" value=" i "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('o');" value=" o "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('p');" value=" p "></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_fh" type="button" onClick="setCapsLock(this);" value="大写"></td>
                            <td style="display: none"><input class="i_button i_button_zm js_ym" type="button" value="韵母" onClick="changePanl('yunmu');"></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('a');" value=" a "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('s');" value=" s "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('d');" value=" d "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('f');" value=" f "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('g');" value=" g "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('h');" value=" h "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('j');" value=" j "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('k');" value=" k "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('l');" value=" l "></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_zm" type="button" value=" 空格" onClick="addValue('\\ ');"></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('z');" value=" z "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('x');" value=" x "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('c');" value=" c "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('v');" value=" v "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('b');" value=" b "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('n');" value=" n "></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="addValue('m');" value=" m "></td>
                            <td colspan="2"><input class="i_button i_button_bs" type="button" value=" 删除" onClick="backspace();"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="c_panel fuhao" id="fuhao">
                    <table align="center" width="98%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('~');" value=" ~ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('@');" value=" @ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('#');" value=" # "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('$');" value=" $ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('¥');" value=" ¥ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('%');" value=" % "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('\'');" value=" ' "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('_');" value=" _ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('|');" value=" | "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('-');" value=" - "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('+');" value=" + "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('=');" value=" = "></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('<');" value=" < "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('>');" value=" > "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('《');" value=" 《 "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('》');" value=" 》 "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('!');" value=" ! "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('?');" value=" ? "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue(';');" value=" ; "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue(':');" value=" : "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('(');" value=" ( "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue(')');" value=" ) "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('*');" value=" * "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('');" value=" / "></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('{');" value=" { "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('}');" value=" } "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('[');" value=" [ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue(']');" value=" ] "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('、');" value=" 、 "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue(',');" value=" , "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('。');" value=" 。 "></td>
                            <td><input class="i_button i_button_fh" type="button" onclick='addValue("\"");' value=' " '></td>
                            <td><input class="i_button i_button_zm" type="button" value=" 空格" onClick="addValue('\\ ');"></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="clearValue();" value="清空"></td>
                            <td><input class="i_button i_button_zm" type="button" value=" 删除" onClick="backspace();"></td>
                            <td><input class="i_button i_button_zm" type="button" value=" 返回" onClick="changePanl('zimu');"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="c_panel yunmu" id="yunmu"  style="display:none;">
                    <table align="center" width="98%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ā');" value=" ā "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('á');" value=" á "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ǎ');" value=" ǎ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('à');" value=" à "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ō');" value=" ō "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ó');" value=" ó "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ǒ');" value=" ǒ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ò');" value=" ò "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ê');" value=" ê "></td>
                            <td><input class="i_button i_button_zm" type="button" value=" 删除" onClick="backspace();"></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ē');" value=" ē "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('é');" value=" é "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ě');" value=" ě "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('è');" value=" è "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ī');" value=" ī "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('í');" value=" í "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ǐ');" value=" ǐ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ì');" value=" ì "></td>
                            <td ><input class="i_button i_button_zm" type="button" value=" 空格" onClick="addValue('\\ ');"></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="clearValue();" value="清空"></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ū');" value=" ū "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ú');" value=" ú "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ǔ');" value=" ǔ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ù');" value=" ù "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ǖ');" value=" ǖ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ǘ');" value=" ǘ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ǚ');" value=" ǚ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ǜ');" value=" ǜ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('ü');" value=" ü "></td>
                            <td><input class="i_button i_button_zm" type="button" value=" 返回" onClick="changePanl('zimu');"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="c_panel gongshi" id="gongshi">
                    <table align="center" width="98%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td><input class="i_button i_button_fh i_icon i_icon_1" type="button" onClick="addValue('\\times',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_2" type="button" onClick="addValue('\\div',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_3" type="button" onClick="addValue('\\cdot',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_4" type="button" onClick="addValue('\\leq',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_5" type="button" onClick="addValue('\\geq',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_6" type="button" onClick="addValue('\\neq',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_7" type="button" onClick="addValue('\\frac{}{}',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_8" type="button" onClick="addValue('^{}',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_9" type="button" onClick="addValue('_{}',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_10" type="button" onClick="addValue('\\sqrt{}',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_11" type="button" onClick="addValue('\\sqrt[]{}',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_12" type="button" onClick="addValue('\\left |  \\right |',true);"></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('<',true);" value=" < "></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('>',true);" value=" > "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('-',true);" value=" - "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('+',true);" value=" + "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('=',true);" value=" = "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('\\sum',true);" value=" ∑ "></td>
                            <td><input class="i_button i_button_fh" type="button" onClick="addValue('\\approx',true);" value=" ≈ " ></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_15" type="button" onClick="addValue('\\vec{}',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_16" type="button" onClick="addValue('\\dot{}',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_17" type="button" onClick="addValue('\\pi',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_18" type="button" onClick="addValue('\\alpha',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_19" type="button" onClick="addValue('\\beta',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_20" type="button" onClick="addValue('\\angle',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_21" type="button" onClick="addValue('^{\\circ}',true);"></td>
                        </tr>
                        <tr>
                            <td><input class="i_button i_button_fh i_icon i_icon_22" type="button" onClick="addValue('\\Delta',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_23" type="button" onClick="addValue('\\odot',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_24" type="button" onClick="addValue('\\perp',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_25" type="button" onClick="addValue('\\pm',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_26" type="button" onClick="addValue('\\mp',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_27" type="button" onClick="addValue('\\theta',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_28" type="button" onClick="addValue('\\lambda',true);"></td>
                            <td><input class="i_button i_button_fh i_icon i_icon_29" type="button" onClick="addValue('\\mu',true);"></td>
                            <td><input class="i_button i_button_zm" type="button" value=" 空格" onClick="addValue('\\ ');"></td>
                            <td><input class="i_button i_button_zm" type="button" onClick="clearValue();" value="清空"></td>
                            <td><input class="i_button i_button_zm" type="button" value=" 删除" onClick="backspace();"></td>
                            <td colspan="2"><input class="i_button i_button_bs" type="button" value=" 返回" onClick="changePanl('zimu');"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<br><br><br><br><br><br><br><br><br>
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 瀑布流 收藏 预览 自适应页面大小 响应式区块列表布局 摇摆 烟花 清单样式 照相机 注释 下划线 结构图 鼠标悬停 条形码 弹幕 画板 朋友圈样式 红包 css绘制样式 支付 图文布局 右键菜单 图片头像上传 二维码 文字提示框 文件上传 地图 提示框/弹出层 文本框 计算器 layer 下拉框 计时器 lightbox 复选 桌面 单选 跳转 Tooltip工具提示框 登录框 步骤 浮动提示框 注册框 键盘 html5弹窗动画 搜索框 签到 验证码 分享 二级联动 点赞 投票 三级联动 雪花 城市选择 打印 value赋值 筛选 答题 按钮控制 购物车 震动 颜色选择 表单提交 全选/反选 图表 添加删除 鼠标滑过 添加标签 抽奖 密码强度验证 表情 表单验证 qq空间 头像截图 html5按钮动画 星星打分评分 按钮样式 密码修改设置 编辑器 播放器 电子杂志 排行榜 分页翻页 排序 表格隔行变色 table表格 进度条 多功能 弹出层拖动 窗口提示框 滑动星星打分 切换按钮 form表单 其他更多

×
×
51前端

注册

×
绑定手机

请绑定手机号,在继续操作

×
单次下载支付

应付金额:279

支付完成后,回到下载页面,在进行下载

官方QQ群
意见反馈
qq群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到