gpt4 book ai didi

javascript - Node.js 将页面 View 转移到其他页面 View 堆栈

转载 作者:太空宇宙 更新时间:2023-11-04 02:57:32 25 4
gpt4 key购买 nike

我想在node.js页面中生成其他页面,例如php yeild

  <!--  center   -->

<div class="row" style="min-height:500;margin:5px 10px 0px 10px;" >

// i whant @yield('main') here like php
</div>



<!-- footer -->
<footer class="row" name="footer" >

</footer>

最佳答案

为此,您可以使用 jQuery .load() 方法。下面是示例:

//HTML Code
<div class="row" style="min-height:500;margin:5px 10px 0px 10px;"></div>

//jQuery Code
$(".row").load("main.html"); //Path of you html file

关于javascript - Node.js 将页面 View 转移到其他页面 View 堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34771955/

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