网格中文本框的JavaScript焦点问题 [英] Javascript focus problem for a textbox in grid

查看:81
本文介绍了网格中文本框的JavaScript焦点问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,

我有一个网格,其中一行中有两个文本框,即从QTY 到QTY ,该文本框是在该行本身中选择的.当我在网格中添加另一个空行并且如果我选择相同的项目,那么我必须检查从数量到数量框中的焦点丢失事件检查上一行从数量到数量中的值的行的当前行从数量"或到数量"不位于以上行的从数量"之间或要数量.

我无法使用JavaScript做到这一点,因为我是新手.

请帮助我找到一些代码或解决方案.

谢谢

Varun Sareen

Dear Friends,

I have a grid in which there are two text boxes i.e., From QTY and To QTY in a row for an item selected in the row itself. When I add another empty row in the grid and if i select the same item then i have to give a check on the focus lost event of the From QTY or To QTY box of that row for checking the value from the above row From QTY and To QTY that the current row From quantity or To quantity doesn''t lie between the above row From quantity or To quantity.

I am unable to do that with JavaScript as i am new to it.

Please help me find some code or solution to it.

Thanks

Varun Sareen

推荐答案

我建​​议您花一些时间阅读 http://jquery上的文档.com/ [^ ]

这样的事情.当然,我不知道您是如何实际构造元素的.

I would suggest you spend some time reading the documentation at http://jquery.com/[^]

Something like this. Of course I have no idea how you are actually structuring the elements.


("#fromQty").blur(function() { // Get the current row var parent =
("#fromQty").blur(function() { // Get the current row var parent =


(this).parent(); // Get the previous row var previous = parent.previous(); // Get the value var qty = previous.children("#fromQty")val(); });
(this).parent(); // Get the previous row var previous = parent.previous(); // Get the value var qty = previous.children("#fromQty")val(); });


这篇关于网格中文本框的JavaScript焦点问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆