如何在JavaScript函数中获取GridView footerRow的引用 [英] How to get the reference of GridView footerRow in a JavaScript function

查看:104
本文介绍了如何在JavaScript函数中获取GridView footerRow的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..


我有一个带有页脚行的gridview包含两个文本框和一个用于将新记录插入gridview的按钮。

我想在进入数据库之前在客户端验证这些文本框的值。我决定添加一个javascript函数..但是如何获得对footertemplate中的文本框的引用。


先谢谢。


BTR。

解决方案

在你的函数中只需使用 document.getElementsByTagName(''input''); 然后遍历返回的节点列表并选择您需要的节点...检查您需要的type属性或wahtever ...


亲切的问候


非常感谢您的回复..


我是非常新的javascript。


如果你不介意请在这里提供soem代码。


谢谢

BTR。

;)函数看起来像这样(将检查所有输入类型=''text'' - 空值的节点):

展开 | 选择 | Wrap | 行号


Hi..

I''ve a gridview with a footer row contains two textboxes and one button for inserting the new records to the gridview.

I want to validate the values of these text boxes on client side before entering into the database .im decided to add one javascript function..but how can i get the reference to the textboxes which are there in the footertemplate.

Thanks in advance .

BTR.

解决方案

in your function just use document.getElementsByTagName(''input''); and then loop through the returned node list and pick the nodes you need ... check for the type attribute or wahtever you need ...

kind regards


Thank you very much for the reply..

im very new to the javascript.

If you dont mind kindly please provide soem code over here.

Thanks
BTR.


;) the function could look like this (will check all input type=''text''-nodes for empty values):

Expand|Select|Wrap|Line Numbers


这篇关于如何在JavaScript函数中获取GridView footerRow的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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