用于在文本框中显示选定行的ID的Javascript代码. [英] Javascript code to display selected rows' id in a textbox.

查看:70
本文介绍了用于在文本框中显示选定行的ID的Javascript代码.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C#.net项目,其中有一个显示数据库中个人详细信息的gridview.gridview包含一个复选框字段.gridview外部有一个文本框和删除按钮.
我的要求是,当我检查gridview中的行时,应在gridview外部的文本框中显示其ID,以逗号分隔.当我取消选中时,应将其ID删除.删除按钮,应删除其在文本框中的ID的详细信息.所有这些活动都应由javascript完成.请帮助.

I have a C#.net project.In that I have a gridview to display personal details from the database.This gridview contains a checkbox field.There is a textbox and delete button outside the gridview.
My requirement is,when I checked rows in a gridview,their id''s should be displayed, separated by commas, on the textbox outside the gridview.When I unchecked,it''s id should be removed.When I click on the delete button,the details whose ids on the textbox should be deleted. All these activities should done by javascript.Please help.

推荐答案

您已经获得5票反对.但我会给你一个指针

You have got 5 down vote already. But I will give you a pointer

<table>
   <tr>
       <td><iNPUT TYPE='checkbox' ID='Checkbox_1' onclick='document.getElementById("Text_1").value=1'></td>
       <td><iNPUT TYPE='text' id='Text_1' value=''></td>
   <tr>
</tr></tr></table>



现在,如何以编程方式实现它取决于您自己



now, how you would achieve it in pro-grammatically is up to you


这篇关于用于在文本框中显示选定行的ID的Javascript代码.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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