服务器上的网站导航问题 [英] Navigation problem in website on server
本文介绍了服务器上的网站导航问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在一个简单的网站上遇到问题,我正在使用按钮在不同的页面之间切换,
在每个按钮后面我使用onclick()方法打开其他页面。
方法我使用的是onclick =windows.open('xyz.html')的javascript。
但是当我点击一个按钮打开一个特定页面,该特定页面未打开,而是显示另一页面。
注意:网站被放置在apachi(wamp服务器)的服务器上使用php。
解决方案
function loadHome()
{
window.location.assign(' ../ index.php');
}
尝试使用以下
onClick = window.location ='http://www.yoururl.com/xyz.html'\"
或
onClick = window.navigate('http://www.yoururl.com/xyz.html')
这里是一个解决方案:
window 。 location .replace( http://yourwebsite.com/page1.php) ;或
窗口。 location .href( http ://yourwebsite.com/page1.php跨度>);
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.
Method i'm using is onclick = "windows.open('xyz.html')" of javascript.
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.
解决方案
function loadHome() { window.location.assign('../index.php'); }
Try to use following
onClick = " window.location = 'http://www.yoururl.com/xyz.html'"
Or
onClick = " window.navigate('http://www.yoururl.com/xyz.html')"
Here is a solution:
window.location.replace("http://yourwebsite.com/page1.php");or
window.location.href("http://yourwebsite.com/page1.php");
这篇关于服务器上的网站导航问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文