使用jsp dynamic include时,Onload可以提前触发吗? [英] Onload can fire early when using jsp dynamic includes?

查看:143
本文介绍了使用jsp dynamic include时,Onload可以提前触发吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当jsp页面包含jsp动态包含...

When a jsp page includes jsp dynamic includes...

<jsp:include page="filename.jsp" /> 

...文档onload事件(或原型的dom:loaded事件)是否有可能被过早触发? (即,在包含的filename.jsp完全加载之前)

...is it possible that the document onload event (or prototype's dom:loaded event) could get fired too early? (i.e. before the included filename.jsp has fully loaded)

我怀疑可能是这种情况的原因是,所包含的文件是单独编译的,并且仅在运行时由指令包含.父jsp可能假设指令本身的加载足以考虑已加载DOM-包含页是异步加载的,并且其加载可能不受文档监视.

The reason I suspect this may be the case is that the included file is compiled separately and only included by directive at runtime. The parent jsp might assume that loading of the directive itself is sufficient to consider the DOM is loaded - the includes page is loaded asynchronously and its loading is might not be monitored by the document.

这是一个有效的问题吗?

Is this a valid concern?

预先感谢

推荐答案

这是包含在服务器端,而不是客户端.当然不是异步的.客户端收到一个响应.右键单击页面并查看源.都是纯HTML.

This is included serverside, not clientside. It's certainly not asynchronously. The client receives one response. Rightclick page and view source. It's all plain HTML.

如果您在使用onload时遇到问题,则它位于其他位置.验证/验证生成的HTML输出.

If you have problems with onload, it lies somewhere else. Verify/validate the generated HTML output.

这篇关于使用jsp dynamic include时,Onload可以提前触发吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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