从同一目录中的另一个页面引用index.html页面 [英] referencing the index.html page from another page in the same directory

查看:90
本文介绍了从同一目录中的另一个页面引用index.html页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的public_html目录中,我有一堆文件:

index.html

x.html,y.html等


当用户访问没有文件名的域时,

他/她会自动访问index.html文件。

所以,我们他/她转到x.html或y.html,我有指向index.html的后退指针。


我正在使用:

< a href ="">返回首页< / a>。

这在Internet Explorer中运行良好,但在Firefox中

它基本上将用户带回当前

页面的顶部。为了让Firefox工作,我不得不说:

< a href ="没有index.html的完整原始域名">返回

my主页< / a>。

这是:

(a)Firefox有问题吗?

(b)问题我的HTML代码最终会有不可预测的

结果取决于浏览器类型?


Anoop

In my public_html directory, I have a bunch of files:
index.html
x.html, y.html, etc.

When a user accesses the domain without a file name,
he/she automatically accesses the index.html file.
So, we he/she goes to x.html or y.html, I have
back-pointers to index.html.

I was using:
<a href="">Back to the homepage</a>.
This worked fine in Internet Explorer, but in Firefox
it basically takes the user back to the top of the current
page. To make things work with Firefox I end having to say:
<a href="full original domain name without the index.html">Back to
my homepage</a>.

Is this:
(a) A problem with Firefox?
(b) A problem with my html code that ends up having unpredictable
results depending on the browser type?

Anoop

推荐答案

Anoop Ghanwani写道:
Anoop Ghanwani wrote:
我使用的是:
< a href ="">返回主页< / a> ;。
这在Internet Explorer中运行良好,但在Firefox中它基本上将用户带回到当前页面的顶部。
(a)Firefox有问题吗?


AFAIK,null URI的浏览器行为未定义。

(b)我的html代码出现问题,最终导致无法预测
结果取决于浏览器类型?
I was using:
<a href="">Back to the homepage</a>.
This worked fine in Internet Explorer, but in Firefox
it basically takes the user back to the top of the current
page. (a) A problem with Firefox?
AFAIK, the behavour of browsers for null URIs is undefined.
(b) A problem with my html code that ends up having unpredictable
results depending on the browser type?




使用href =" /"," ./& quot ;,\"index.html"或/ index.html"

-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

Home是〜/ .bashrc的地方



Use href="/", "./", "index.html", or "/index.html"
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Anoop Ghanwani写道:
Anoop Ghanwani wrote:
在我的public_html目录中,我有一堆文件:
index.html
x.html,y.html等
<当用户访问没有文件名的域时,他/她会自动访问index.html文件。
所以,我们他/她去x.html或y.html,我有指向index.html的指针。

我正在使用:
< a href ="">返回主页< / a>。<这在Internet Explorer中运行良好,但在Firefox中它基本上将用户带回到当前页面的顶部。为了让Firefox工作,我不得不说:
< a href ="没有index.html的完整原始域名">返回
我的主页< / a>。这是:
(a)Firefox有问题吗?
(b)我的html代码出现问题,最终会有不可预测的结果取决于浏览器类型?
In my public_html directory, I have a bunch of files:
index.html
x.html, y.html, etc.

When a user accesses the domain without a file name,
he/she automatically accesses the index.html file.
So, we he/she goes to x.html or y.html, I have
back-pointers to index.html.

I was using:
<a href="">Back to the homepage</a>.
This worked fine in Internet Explorer, but in Firefox
it basically takes the user back to the top of the current
page. To make things work with Firefox I end having to say:
<a href="full original domain name without the index.html">Back to
my homepage</a>.

Is this:
(a) A problem with Firefox?
(b) A problem with my html code that ends up having unpredictable
results depending on the browser type?




< a href ="">没意思。 IE碰巧按你的意愿解释它。你

可以使用< a href =" index.html">或者< a href =" /">。


-

马克。



<a href=""> means nothing. IE happens to interpret it as you want. You
could use <a href="index.html"> or <a href="/">.

--
Mark.


gh******@gmail.com (Anoop Ghanwani)写道:
gh******@gmail.com (Anoop Ghanwani) wrote:
在我的public_html目录中,我有一堆文件:
index.html
x.html,y.html等。

当用户访问没有文件名的域,
他/她自动访问index.html文件。
所以,我们他/她去x.html或y.html,我有
返回-pointers to index.html。

我正在使用:
< a href ="">返回主页< / a>。


亲爱的。空URL作为链接的行为是未定义的。

这在Internet Explorer中运行良好,但在Firefox中它基本上将用户带回到当前页面的顶部。为了让Firefox工作,我不得不说:
< a href ="完整的原始域名,不带index.html">返回
我的主页< / a>。


为什么?为什么不只是< a href =" index.html">我的主页< / a>或

< a href =" /">我的主页< / a> ?

(由于用户可能通过

搜索引擎或书签到达您的页面,因此可能不会''返回'' 总的来说。

这是:
(a)Firefox有问题吗?
(b)我的html代码出现问题,最终导致无法预测
结果取决于浏览器类型?
In my public_html directory, I have a bunch of files:
index.html
x.html, y.html, etc.

When a user accesses the domain without a file name,
he/she automatically accesses the index.html file.
So, we he/she goes to x.html or y.html, I have
back-pointers to index.html.

I was using:
<a href="">Back to the homepage</a>.
Oh dear. The behaviour of empty URLs as links is undefined.
This worked fine in Internet Explorer, but in Firefox
it basically takes the user back to the top of the current
page. To make things work with Firefox I end having to say:
<a href="full original domain name without the index.html">Back to
my homepage</a>.
Why? Why not just <a href="index.html">My homepage</a> or
<a href="/">My homepage</a> ?
(Drop the ''back to'' as the user may have arrived at your page via a
search engine or bookmark and thus might not be going ''back'' at all.)
Is this:
(a) A problem with Firefox?
(b) A problem with my html code that ends up having unpredictable
results depending on the browser type?




(b)


史蒂夫


-

我的理论给你起见,我的异端邪说激怒了你,

我从不回信,你也不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>



(b)

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>


这篇关于从同一目录中的另一个页面引用index.html页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆