在ASP.Net AJAX中使用JQuery修改控件结构 [英] Modifying Control Structure with JQuery in ASP.Net AJAX

查看:46
本文介绍了在ASP.Net AJAX中使用JQuery修改控件结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面可以修改jquery的控件结构:

I have a page that modifies the control structure from jquery:

var body = GetBody();
$(body).wrapInner("<div id=''wrapper'' style=''overflow: auto; position: relative;''></div>");



并且包装这段代码似乎破坏了AJAX的$ find函数.经过研究后,我发现包装器正在清空Sys.Application._components数组.我正在寻找的是一种防止这种情况发生的方法,或者是在修改控件结构后重建_components数组.谢谢!



and wrapping this code seems to break AJAX''s $find function. After doing some research I discovered that somehow, wrapinner is emptying out the Sys.Application._components array. What I''m looking for is a way to prevent this from happening or to rebuild the _components array after the control structure has been modified. Thanks!

推荐答案

(body).wrapInner(< div id =" wrapper"style ="''溢出:自动;位置:相对;" ></div>);
(body).wrapInner("<div id=''wrapper'' style=''overflow: auto; position: relative;''></div>");



并包装这段代码似乎破坏了AJAX的



and wrapping this code seems to break AJAX''s


查找功能.经过研究后,我发现以某种方式,包装器清空了Sys.Application._components数组.我正在寻找的是一种防止这种情况发生的方法,或者是在修改控件结构后重建_components数组.谢谢!
find function. After doing some research I discovered that somehow, wrapinner is emptying out the Sys.Application._components array. What I''m looking for is a way to prevent this from happening or to rebuild the _components array after the control structure has been modified. Thanks!


尝试使用.html(''< div .....>'');
而不是wrapinner.
这将更改内部html,而不会破坏.find.
try using .html(''<div.....>'');
instead of wrapinner.
this will change inner html, and not break the .find.


这篇关于在ASP.Net AJAX中使用JQuery修改控件结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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