在主代码中,我可以在另一个页面中继续我的HTML代码吗? [英] Is there that I can continue my HTML code in another page, while being in the main code?

查看:99
本文介绍了在主代码中,我可以在另一个页面中继续我的HTML代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在另一个页面中继续我的HTML代码,而在主代码中?

Is there that I can continue my HTML code in another page, while being in the main code?

例如,在HTML中,您可以创建1000个额外页面JS,只需使用类似于

For example, in HTML you can make 1000 extra pages of JS and just use something like

<script src="js/example.js"></script>

使HTML页面看起来更清晰,更少受到额外JS代码的阻碍,
有没有一种方法可以做到这一点,继续添加更多的HTML元素到另一个页面,而使用我的主页相同的东西?

to make the HTML page look cleaner, and less obstructed by the extra JS code, is there a way I can do that to continue adding more HTML elements to another page while using the same stuff from my main page?

即时通讯编写大量的HTML和don不想让主页面太乱

im writing a lot of HTML and don't want to make the main page too messy

推荐答案

使用jQuery .load()

$('#idofDiv').load('file.html');

这篇关于在主代码中,我可以在另一个页面中继续我的HTML代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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