当我隐藏div时,是否加载了div内容 [英] when i hide the div then the div content is loaded or not

查看:128
本文介绍了当我隐藏div时,是否加载了div内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用div ID隐藏了div ID.visible = false,但是我怀疑代码运行后是否加载了div内容

when i hide the div using div ID.visible=false but i have a little doubt after the code runs the div content is loaded or not

推荐答案

它未加载.您必须设置样式可见性,以便将其发送给客户端. .Net中设置为Visible = false的所有内容实际上都不会发送到客户端,因此您无法在JS中使用它.
It is not loaded. You''ll have to set style visibility so that it will be sent to the client. Anything in .Net that you set as Visible = false is not actually sent to the client at all so you cannot get to it in JS.




那将被加载到内存中,但是该div的HTML不会在视图源"中呈现.
看看讨论 ^ ].

--Amit
Hi,

That will be loaded in the memory but HTML for that div will not be rendered in the "view source".
Have a look at the discussions here[^].

--Amit


这篇关于当我隐藏div时,是否加载了div内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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