在modepopwindow关闭后,动态添加的文本框未被选中 [英] dynamically added textboxes are not getting selected after the modepopwindow is closed

查看:95
本文介绍了在modepopwindow关闭后,动态添加的文本框未被选中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在我的项目中,一个小问题即将来临,我无法弄清楚它为什么会来。



当我关闭modelpopextender并选择文本框时,他们没有选择。可以告诉它为什么会这样,以及如何解决这个问题。



谢谢。

Hi Every One,

In my project a small issue is coming i couldnot figure it out why it is coming.

When I am closing the modelpopextender and selecting the text boxes, they are not getting selecting.Can Any one tell why it is coming and how to solve this issue.

Thanks.

推荐答案

我相信这就是你所要求的



<大>使用jquery选择器你无法选择动态创建的元素。

如果这是正确的那么这可能是问题,因为我也面临同样的问题事情。



当您创建在页面上不可用的动态元素并尝试使用jquery选择器但是无法选择它时。



I believe this is what you are asking

Using jquery selectors you are unable to select elements which are created dynamically.
if this is right then This is what may be the issue as i have also faced the same thing.

When you create dynamic elements which will not be available on page and try to select using jquery selector but it can not be selected.

Dynamically created elements will not be accessible untill we add to page 
once we create element make sure we put in page i.e.


' #divSuggestion' )。html(' < input type =textid =txtclass =text />');在行之后可以选择
('#divSuggestion').html('<input type="text" id="txt" class="text" />'); after this line you can select


' .text'



其中divSuggestion是要在其中添加文本框元素的Div 。

将Html字符串插入到web元素后,它将在页面上显示,然后你可以选择那些文本框。



希望这个可能有帮助。

快乐编码


where divSuggestion is the Div inside which wanna add the textbox element.
after inserting Html string to web element ,it will be available on the page,then you can select those textbox.

Hope this may help.
Happy coding


这篇关于在modepopwindow关闭后,动态添加的文本框未被选中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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