你如何在html5中加载部分html? [英] How do you load a partial html in html5?

查看:202
本文介绍了你如何在html5中加载部分html?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用包含链接和徽标的部分页面来实现index.html页面,并根据链接点击更改正文内容。

I am trying to implement an index.html page with a partial page that contains links and logo, and change body content depending on the link click.

是否存在一个轻量级的js库,允许你在html5中做到这一点?

Is there a light js library that allows you to do that in html5?

推荐答案

使用jQuery

$('#result').load('ajax/test.html');

http: //api.jquery.com/load/

这篇关于你如何在html5中加载部分html?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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