プロが教える店舗&オフィスのセキュリティ対策術

下記の記述は「test1.html」に飛ぶソースです。
test1.htmlを開く際に「別ウィンドウ」で開きたい為、「target="_blank"」を入れたいのですが、どこに入れれば良いのでしょうか?

<div v:shape="_x0000_s3165" class=O
onclick="parent.location.href='../test1.htm';window.event.cancelBubble=true;"
style='cursor:hand;position:absolute;top:22.89%;left:29.78%;width:7.4%;
height:3.61%'>
<div style='mso-line-spacing:"100 50 0";mso-char-wrap:1;mso-kinsoku-overflow:
1;position:absolute;top:0%;left:0%;width:100.0%;height:100.0%'><span lang=JA
style='font-family:"MS Pゴシック";mso-fareast-font-family:"MS Pゴシック";mso-fareast-hint:
yes;mso-ansi-language:EN-US'>リンク</span><span lang=JA style='font-family:"MS Pゴシック";
mso-fareast-font-family:"MS Pゴシック";mso-ansi-language:EN-US;mso-special-format:
lastCR;display:none'>
</span></div>
</div>

よろしくお願いします。

A 回答 (3件)

window.open().location.href="../test1.htm";


こうすれば新しいウィンドウを開いて
遷移できるわよ。
    • good
    • 0

<A href="test1.html" target="_blank">リンク</A>


↑これだけのことですよね。初歩の初歩。

No.2の方も書かれていますが、ソースを見ただけで吐き気がします。
是非ともワードとかじゃなくてHTMLタグからページ作りやってください。急がば回れです。
    • good
    • 0

target属性は


<a href="~" target="_blank">
と、aタグに記述します。
上記のコードにはaタグが見当たらないですが、どこからリンクさせたいのですか?

てか、WordでHTML作るのはお勧めできません。上記のコードのように余計なコードがどっさり入ってファイルを無駄に重くするだけです。
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!