2013-11-01 112 views
0

我正在爲將在本地機器上運行的基於互聯網瀏覽器的應用程序框架集工作。我希望單擊圖像時將目標定位到顯示細節的另一個框架。我試圖包括「目標=方式」在圖像源的端部如下但是,產生了錯誤的語法時才:在gallery.php在框架集中定位框架

IMAGE代碼:在索引

<a href=details.php?c_id=<?php echo $c_id ?> ><img src="./images/<?php echo $row['cfilename'] target=details;?>" width="100" height="100" alt="" /> 

FRAMESET。 PHP:

<FRAMESET ROWS="17%,*"> 
    <FRAME SRC="titlebar.php" NAME=TITLE SCROLLING=NO> 

    <FRAMESET COLS="26%,30%,*"> 
     <FRAME SRC="sidebar.php" NAME=sidebar TARGET=gallery> 
     <FRAME SRC="gallery.php" NAME=gallery> 
     <FRAME SRC="details.php" NAME=details> 

    </FRAMESET> 

    <NOFRAMES> 
    <H1>Criminal Records Database</H1> 
    No frames? No Problem! Take a look at our 
    <A HREF="index.php">no-frames</A> version. 
    </NOFRAMES> 

</FRAMESET> 

回答

0

你需要添加目標=「_ nameofframe」的href標記,並告訴它打開新的鏈接。 你的情況,畫廊圖像的href應具有以下目標=「細節」

<a href=details.php?c_id=<?php echo $c_id ?> ><img src="./images/<?php echo $row['cfilename'];?>" target="details" width="100" height="100" alt="" />

+0

你的意思是像在上面的第一個代碼?這是我的,但得到一個sytax錯誤。 – user1868306

+0

不是這樣的...按照您寫alt,width和height的方式進行操作... Target是屬性超鏈接。 –

+0

是這樣做的: '>