如何从弹出窗口中获取复选框值? [英] How to get checkbox value from Popup window?

查看:306
本文介绍了如何从弹出窗口中获取复选框值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将表绑定到网格中,并且在弹出窗口中的每一行都有chekbox。在这里,我需要从弹出窗口中检查弹出窗口中的值。示例我在主页面中有一个像添加部门的按钮。如果我单击此按钮,则会出现一个弹出窗口,其中包含每个部门的复选框。在弹出窗口中单击按钮Adddepartmrnt后,我需要在SelectedDepartmenttbl表中存储部门信息。

请帮助我......

I have bind a table in to grid and which has chekbox for every row in a popup window. Here i need get value from that popup window what are checked in popup window. Example i have one button like Add Department in main Page. If i click this button there is popup window which has checkbox for every department. here i need store department information in SelectedDepartmenttbl table after click button Adddepartmrnt in popup window.
kindly help me...

推荐答案

所有,我建议你不要使用弹出窗口,因为他们对很多人很生气,主要是因为网络广告,所以很多人会使用浏览器插件阻止他们。我不是指模态弹出窗口,我的意思是用JavaScript创建的窗口 window.open

http://www.w3schools.com/jsref/met_win_open.asp [ ^ ]。



现在,如果你还想这样做,请注意,此调用返回对新创建的窗口的引用。通过此参考,您可以通过DOM访问其内容中的任何内容:

http:// www .w3schools.com / jsref / obj_window.asp [ ^ ]。



首先,要注意文件属性:

http://www.w3schools.com/jsref/dom_obj_document.asp [ ^ ],

http://www.w3schools.com/jsref/dom_obj_document.asp [ ^ ]。



从这一点上,你可以看到你可以像使用当前文档一样使用该窗口的文档(th从当前页面的JavaScript访问一个。)



-SA
First of all, I would advise you to refrain from using popup windows, because they annoyed to many people, mostly due to Web ads, so many will use browser plug-ins to block them. I don't mean "modal popup" here, I mean window created with JavaScript window.open:
http://www.w3schools.com/jsref/met_win_open.asp[^].

Now, if you still want to do that, note that this call returns a reference to the newly created window. Through this reference, you can access anything in its content through the DOM:
http://www.w3schools.com/jsref/obj_window.asp[^].

First of all, pay attention for the document property:
http://www.w3schools.com/jsref/dom_obj_document.asp[^],
http://www.w3schools.com/jsref/dom_obj_document.asp[^].

From this point, you can see that you can use that window's document in the same way as you use the current document (the one accessed from the JavaScript on the current page).

—SA


这篇关于如何从弹出窗口中获取复选框值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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