如何将html文本文件分成多个文件? [英] How to separate html text file into multiple files?

查看:45
本文介绍了如何将html文本文件分成多个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于 html 的非常基本的问题.

Very basic question about html.

因为太长,想把文件分成多个文件.这不是关于使用 iframe 等,而只是想包含多个文本文件来创建 html 文件的 .

Because the <body> is too long, I want to divide the file into multiple files. It is not about using iframe etc, but just want to include multiple text files to create <body> of the html file.

谢谢!

推荐答案

你可以用 jquery 做到这一点

You can do it using jquery

<head> 
  <script src="jquery.js"></script> 
  <script> 
    $(function(){
      $("#Contenttoinclude").load("b.txt or b.html"); 
    });
  </script> 
</head> 

并将其加载到 html

and load it in html

<body> 
 <div id="Contenttoinclude"></div>
</body>

这篇关于如何将html文本文件分成多个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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