[英]Navigation between different pages of website on server
I'm facing problem in a simple website, where I'm using buttons to switch between different pages, 我在一个简单的网站上遇到了问题,我在这里使用按钮在不同页面之间进行切换,
behind the every button I'm using onclick()
method to open other page. 我正在使用
onclick()
方法打开每个页面的每个按钮后面。
Method I'm using is onclick = "windows.open('xyz.html')"
of JavaScript. 我使用的方法是JavaScript的
onclick = "windows.open('xyz.html')"
。
but when I do click on a button to open a specific page , that specific page does not open, another page become appear instead. 但是当我单击按钮打开特定页面时,该特定页面没有打开,而是出现了另一个页面。
Note: website is placed on server of apachi(wamp server) using php there.
注意:网站使用php放置在apachi服务器(wamp服务器)上。
尝试这个
window.location='xyz.html'
Try this. 尝试这个。
window.location.href = 'xyz.html';
window.open('xyz.html')//This will open xyz.html in a new window.
You may try this: 您可以尝试以下方法:
onclick="window.location='xyz.html' ";
OR 要么
header("Location:http: //www.xyz.html/") ` (or) ` header('Location: http://www.xyz.html/');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.