我正在尝试<div id="content"></div>
使用 AJAX 和 jQuery 在按钮单击时加载 HTML 文件,但单击未加载它。下面是代码:
<body>
<div id="header">
<div id="radio">
<input type="radio" id="navmenu1" name="radio"><label for="navmenu1">Home</label>
<input type="radio" id="navmenu2" name="radio"><label for="navmenu2">Contact</label>
<input type="radio" id="navmenu3" name="radio"><label for="navmenu3">Resume</label>
</div>
<div id="social">
<a href="https://www.facebook.com/han.chang.10" target="new"><img src="img/facebook.png" class="facebook" alt="Facebook" /></a>
<a href="http://www.linkedin.com/pub/han-chang/58/959/a74/"><img src="img/linkedin.png" class="linkedin" alt="linkedin" /></a>
<a href="http://www.linkedin.com/pub/han-chang/58/959/a74/"><img src="img/twitter.png" class="twitter" alt="twitter" /></a>
<a href="mailto:shuhanchang612@gmail.com"><img src="img/gmail.png" class="gmail" alt="gmail" /></a>
</div>
</div><!--head-->
<div id="content-area">
<div id="content"></div>
</div>
<div id="footer-row">
<footer>
<div id="footer-row-1">
<ul id="footer">
<li>© 2013</li>
</ul>
</div>
</footer>
</div>
</body>
home.js 如下:
$(function(){
$("#radio").buttonset({
$("#content").load("Page1.cshtml");
});
})