在ASP.Net AJAX中使用JQuery修改控件结构

编程入门 行业动态 更新时间:2024-10-14 08:22:43
本文介绍了在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修改控件结构

本文发布于:2023-11-25 00:29:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627566.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控件   结构   Net   ASP   JQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!