如何使用jquery将多个链接重定向到网站上的div?
我有一个登陆页面,上面有很多指向我网站域中各个html文件的链接。是否可以在我的登录页上的div中加载这些其他html文件 意思是,而不是:如何使用jquery将多个链接重定向到网站上的div?,jquery,html,jquery-ui,autocomplete,Jquery,Html,Jquery Ui,Autocomplete,我有一个登陆页面,上面有很多指向我网站域中各个html文件的链接。是否可以在我的登录页上的div中加载这些其他html文件 意思是,而不是: Homepage.com Link 1 > takes you to new page homepage.com/link1.html Link 2 > takes you to this page homepage.com/link2.html Link 3 > takes you to this other page ho
Homepage.com
Link 1 > takes you to new page homepage.com/link1.html
Link 2 > takes you to this page homepage.com/link2.html
Link 3 > takes you to this other page homepage.com/link3.html
有没有办法做到这一点:
Homepage.com
[search box where autocompleted selection takes you to links]
------
<div class='content'>
html is loaded here
</div>
Homepage.com
[自动完成选择的搜索框将您带到链接]
------
html在这里加载
我可以使用jqueryui将autocomplete链接到输入字段,但我不知道如何链接所选术语以加载新页面
谢谢jQuery的可能就是您想要的。您甚至可以在该页面上指定要从中提取的容器元素
$('.content').load('homepage.com/link1.html #container');
如果其他页面是完整的html页面(不仅仅是片段),那么最好使用iframe。