0

画像遷移スライドショーを使用しているアプリケーションを作成しています。画像のスライドショーでは、ハイパーリンクを使用して別のページに移動しました。ただし、ページは新しいウィンドウで開きます。ページを同じウィンドウで開きたい。

flashyslideshow.prototype.getSlideHTML=function (index) {
    var slideHTML= (this.imagearray[index][1])?'<a href=  "' + this.imagearray[index][1]+'" target = "'+this.imagearray[index][2]+ "_self" '">\n' : ''; //hyperlink slide?
    slideHTML+='<img src="'+this.imagearray[index][0]+'" height="550" width="100%" >';
    slideHTML+=(this.imagearray[index][1])? '</a><br />' : '<br />';
    slideHTML+=(this.imagearray[index][3])? '<font face="bookman old style" color="blue" size="3">' + this.imagearray[index][3] : ''; //text description?
    return slideHTML; //return HTML for the slide at the specified index
}
4

3 に答える 3

0

<a>タグ内に追加

target="_self"

これにより、リンクが同じウィンドウで強制的に開かれます。

于 2012-07-05T14:12:00.717 に答える
0
<a href="www.google.com" target="_self">Google</a>
于 2012-07-05T14:19:47.810 に答える