且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过Ajax调用加载html时为什么未下载脚本

更新时间:2023-12-05 08:22:04

.getScript("Scripts/shared/Site.js")
.getScript("Scripts/shared/Site.js")


之后


after


("#container").html(UserControlHtml)
("#container").html(UserControlHtml)


我意识到只有在通过Ajax调用加载UserControl时才会发生这种情况,但我不明白为什么.有人可以解释幕后发生的事情吗?我想了解为什么加载带有脚本的html不会下载脚本

谢谢


I realize that this happens only when I load UserControl through Ajax call, but I don''t understand why. Can someone explain what is going on behind the scene? I want to understand why loading html with script inside it doesn''t downloads the script

Thank you


^ ]可能会帮助您理解.
This[^] may help you understand.