gpt4 book ai didi

asp.net-mvc - 加载处理程序在 MVC 中的什么位置?

转载 作者:行者123 更新时间:2023-12-05 01:27:40 25 4
gpt4 key购买 nike

我想将代码添加到我的 Onload 处理程序,但不确定它在 MVC 应用程序中的什么位置?

 // You may want to place these lines inside an onload handler
CFInstall.check({
mode: "overlay",
destination: "http://localhost:1414/"
});
});

以上代码需要放在onload handler中。

最佳答案

如果我没理解错的话,如果你使用的是 jQuery,你只需要下面这个表达式:

<script>
$(document).ready(function() {
// Handler for .ready() called. Put your logic here.
});
</script>

或者这个,不使用 jQuery:

<script>
window.onload = function(){
// Put your logic here.
}
</script>

包含在您的 view.cshtml 中。

关于asp.net-mvc - 加载处理程序在 MVC 中的什么位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13565856/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com