AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > JavaScript

jquery比较简洁的软键盘特效实现方法

51自学网 http://www.wanshiok.com
jquery,简洁,软键盘,特效,方法

本文实例讲述了jquery比较简洁的软键盘特效实现方法。分享给大家供大家参考。具体实现方法如下:

运行效果图如下:

1. html主要部分如下:

复制代码 代码如下:
<div id="container">
 <textarea id="write" rows="6" cols="60"></textarea>
 <ul id="keyboard">
  <li class="symbol"><span class="off">`</span><span class="on">~</span></li>
  <li class="symbol"><span class="off">1</span><span class="on">!</span></li>
  <li class="symbol"><span class="off">2</span><span class="on">@</span></li>
  <li class="symbol"><span class="off">3</span><span class="on">#</span></li>
  <li class="symbol"><span class="off">4</span><span class="on">$</span></li>
  <li class="symbol"><span class="off">5</span><span class="on">%</span></li>
  <li class="symbol"><span class="off">6</span><span class="on">^</span></li>
  <li class="symbol"><span class="off">7</span><span class="on">&</span></li>
  <li class="symbol"><span class="off">8</span><span class="on">*</span></li>
  <li class="symbol"><span class="off">9</span><span class="on">(</span></li>
  <li class="symbol"><span class="off">0</span><span class="on">)</span></li>
  <li class="symbol"><span class="off">-</span><span class="on">_</span></li>
  <li class="symbol"><span class="off">=</span><span class="on">+</span></li>
  <li class="delete lastitem">delete</li>
  <li class="tab">tab</li>
  <li class="letter">q</li>
  <li class="letter">w</li>
  <li class="letter">e</li>
  <li class="letter">r</li>
  <li class="letter">t</li>
  <li class="letter">y</li>
  <li class="letter">u</li>
  <li class="letter">i</li>
  <li class="letter">o</li>
  <li class="letter">p</li>
  <li class="symbol"><span class="off">[</span><span class="on">{</span></li>
  <li class="symbol"><span class="off">]</span><span class="on">}</span></li>
  <li class="symbol lastitem"><span class="off">/</span><span class="on">|</span></li>
  <li class="capslock">caps lock</li>
  <li class="letter">a</li>
  <li class="letter">s</li>
  <li class="letter">d</li>
  <li class="letter">f</li>
  <li class="letter">g</li>
  <li class="letter">h</li>
  <li class="letter">j</li>
  <li class="letter">k</li>
  <li class="letter">l</li>
  <li class="symbol"><span class="off">;</span><span class="on">:</span></li>
  <li class="symbol"><span class="off">'</span><span class="on">"</span></li>
  <li class="return lastitem">return</li>
  <li class="left-shift">shift</li>
  <li class="letter">z</li>
  <li class="letter">x</li>
  <li class="letter">c</li>
  <li class="letter">v</li>
  <li class="letter">b</li>
  <li class="letter">n</li>
  <li class="letter">m</li>
  <li class="symbol"><span class="off">,</span><span class="on"><</span></li>
  <li class="symbol"><span class="off">.</span><span class="on">></span></li>
  <li class="symbol"><span class="off">/</span><span class="on">?</span></li>
  <li class="right-shift lastitem">shift</li>
  <li class="space lastitem"> </li>
 </ul>
</div>

2. jQuery代码部分需要引入两个文件,具体如下:

<script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/keyboard.js"></script>

完整实例代码点击此处本站下载

希望本文所述对大家的jQuery程序设计有所帮助。


jquery,简洁,软键盘,特效,方法  
上一篇:JavaScript更改原始对象valueOf的方法  下一篇:JavaScript将字符串转换成字符编码列表的方法