如何将一个函数应用于许多文本框?

编程入门 行业动态 更新时间:2024-10-21 19:48:10
本文介绍了如何将一个函数应用于许多文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我不擅长jquery。我得到了一个虚拟键盘jquery。点击文本框虚拟键板出现但我想要另一个文本框也不知道如何修改它可以任何人帮助我....代码如下

< script type = text / javascript > $(document) .ready(function(){ $('#txtkeyboard')。键盘({ autoAccept:true }) < / script >

是我的文本框的id

解决方案

(document).ready(function() { ( '#txtkeyboard')。键board({ autoAccept:true }) < / script >

上面的txtkeyboard中的是我的文本框的id

为你的所有texbox添加一个属性

class =virtualKeyboard

,然后改变你的jQuery脚本这个:

< script type = text / javascript >

Hi,,I am not good at jquery.I got a jquery for virtual key board.On clicking textbox the virtual key board appers but I want tat to another textbox also I dont know how to modify it can any one help me....The code is below

<script type="text/javascript"> $(document).ready(function () { $('#txtkeyboard').keyboard({ autoAccept:true }) </script>

in the above txtkeyboard is the id of my textbox

解决方案

(document).ready(function () {

('#txtkeyboard').keyboard({ autoAccept:true }) </script>

in the above txtkeyboard is the id of my textbox

add an attribute

class="virtualKeyboard"

to all your texboxes and then change your jQuery script like this:

<script type="text/javascript">

更多推荐

如何将一个函数应用于许多文本框?

本文发布于:2023-10-28 01:08:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1535054.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用于   如何将   文本框   一个函数

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!