jQuery.load 加载 HTML 文件 [英] jQuery.load to load HTML file
本文介绍了jQuery.load 加载 HTML 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在此之前我从未使用过jQuery,但我会解释我想要做什么.
index.html
<头><title>我很棒的网站</title><link href="style.css" rel="stylesheet" type="text/css"/><link rel="快捷图标" href="/favicon.ico"/><script src="http://code.jquery.com/jquery-1.9.1.js"></script>头部><身体><!-- <iframe width="100%" height="175" frameborder="0" scrolling="no" src="navbar.html"></iframe>我曾经使用过这个 - 但我不能有下拉菜单.--><!-- 这是我的问题--><脚本>$('#navbar').load('./navbar.html');<noscript><h1>请启用Javascript!</h1></noscript><div id="容器"><!-- 内容在这里-->