2009-01-09 27 views
-1

我有一個web應用程序。在那裏我有一個名爲「家」的鏈接。當用戶點擊web應用程序的起始頁面時,index.jsp應顯示在同一頁面上。我怎樣才能做到這一點。它應該在Internet Explorer中工作。關於主頁

我有以下的html頁面。

<html> 

<body bgcolor="#FFF8DC"> 

<a href="index.jsp" target="parent" >HOME</a> 


</body> 
</html> 

但它不工作。

+0

嘗試發佈您的HTML再次。 – 2009-01-09 10:15:16

+0

是的,你的問題不清楚 - 發表一個樣本,重新提出你的問題。 – CJM 2009-01-09 10:18:19

+0

不工作是什麼意思? – 2009-01-09 10:33:08

回答

4

< A HREF = 「URL」>家</A>

0

也許你打算TARGET = 「_父」?這允許鏈接加載到父框架中

1

可能是解決jsp頁面的問題。嘗試使用完整的網址。

0
`target="_parent"` 

注意__parent

4

爲了讓您鏈接到它駐留在同一窗口中打開,使用方法:

<a href="foo.html" target="_self">some text</a> 

請注意自我之前下劃線。如果您不使用它,您的瀏覽器將查找名爲「self」的框架。

4

參見http://htmlhelp.com/reference/html40/special/a.html

目標屬性用於與框架,以指定的鏈路應該被渲染的幀。如果不存在具有這種名稱的幀,則該鏈接將呈現在新窗口中,除非被用戶覆蓋。特殊幀名稱以下劃線:

* _blank renders the link in a new, unnamed window 
* _self renders the link in the current frame (useful for overriding a BASE TARGET) 
* _parent renders the link in the immediate FRAMESET parent 
* _top renders the link in the full, unframed window 

在HTML 4,則TARGET屬性值是不區分大小寫,以便_top和_TOP都具有相同的含義。但是,大多數瀏覽器將TARGET屬性值視爲區分大小寫,並且不會將_TOP識別爲具有_top的特殊含義。

1

你只是缺少一個下劃線。 「自我」被視爲任何其他名稱標籤。

0

或者,您可以跳過鏈接的target屬性。如果不另外指定,則目標默認爲相同的瀏覽器窗口。