我不确定如何转到用户在我的网站中搜索的新页面。例如,当有人搜索"数学离开证书"我希望将它们重定向到Maths.html页面可以请任何人帮助我吗?
继承我的代码:
<div id="the-basics" class="form-group">
<input id="subjects-input" type="text" class="form-control" placeholder="Search">
</div>
<script type = "text/javascript" src = "../jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="../bootstrap-typeahead.js" type="text/javascript"></script>
<script>
$('#subjects-input').typeahead({
source: [
{name: 'Accounting | Leaving Cert' },
{name: 'Applied Maths | Leaving Cert' },
{name: 'Art | Leaving Cert' },
{name: 'Biology | Leaving Cert' },
{name: 'Business | Leaving Cert' },
{name: 'Chemistry | Leaving Cert' },
{name: 'Classical Studies | Leaving Cert' },
{name: 'Construction Studies | Leaving Cert' },
{name: 'DCG | Leaving Cert' },
{name: 'Economics | Leaving Cert' },
{name: 'Engineering | Leaving Cert' },
{name: 'English | Leaving Cert' },
{name: 'French | Leaving Cert' },
{name: 'Geography| Leaving Cert' },
{name: 'German | Leaving Cert' },
{name: 'History | Leaving Cert' },
{name: 'Home Economics | Leaving Cert' },
{name: 'Irish | Leaving Cert' },
{name: 'Italian | Leaving Cert' },
{name: 'Latin| Leaving Cert' },
{name: 'Mathematics | Leaving Cert' },
{name: 'Music | Leaving Cert' },
{name: 'Physisc | Leaving Cert' },
{name: 'Religious Education| Leaving Cert' },
{name: 'Art | Junior Cert' },
{name: 'Business | Junior Cert' },
{name: 'Classical Studies | Junior Cert' },
{name: 'CSPE | Junior Cert' },
{name: 'English | Junior Cert' },
{name: 'French | Junior Cert' },
{name: 'Geography | Junior Cert' },
{name: 'German | Junior Cert' },
{name: 'History | Junior Cert' },
{name: 'Home Economics| Junior Cert' },
{name: 'Irish | Junior Cert' },
{name: 'Italian | Junior Cert' },
{name: 'Mathematics | Junior Cert' },
{name: 'Music | Junior Cert' },
{name: 'Religious Education| Junior Cert' },
{name: 'Science | Junior Cert' },
{name: 'Spanish| Junior Cert' },
{name: 'Technical Graphics| Junior Cert' },
{name: 'Material Technology (Woodwork) | Junior Cert' }
]
});
</script>