aspx页面中的脚本标签 [英] script tag in aspx page

查看:66
本文介绍了aspx页面中的脚本标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



通常,当我们编写脚本标记

Hi,

When we generally write the script tag

<script></script>

在aspx页面中,何时执行,即在哪个阶段注入页面?

在此先感谢,
Hari

in an aspx page, when does it gets executed, i.e. at what stage it gets injected into the page ?

Thanks in Advance,
Hari

推荐答案

通常来说,当浏览器在HTML流中到达Script标记时,就会执行Script标记. 这里有一个答案,提供了更多详细信息:
Generally speaking a Script tag is executed when the browser reaches it in the HTML stream.
There is an answer which gives a lot more detail here: http://stackoverflow.com/questions/2342974/when-does-the-browser-execute-javascript-how-does-the-execution-cursor-move[^] - see Answer 3


提到的所有HTML代码标记都在Page_Prerender中呈现,这是实际呈现HTML的时间.

如果此代码是@server端编写的,则取决于执行任何语句或注册@page load之后的功能如何实现
All the tags mentioned the HTML code are rendered in Page_Prerender that is when the HTML is actually rendered.

If this code is written @server side it depends on functionality how you want to work it out whether after execution of any statement or register @page load


这篇关于aspx页面中的脚本标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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