これはコードですが、これは非常に単純で、私が達成したいもののプロトタイプのようです。私は単に画面のトップ10%にボタンや何かをつけて、これらの行に沿ってiframe内のランダムなリンクを開き、残りの画面を占めるようにしたいだけです。しかし、これをターゲットiframeで開くのに問題があります。だから私はそれをあまりにもあまりにも乱し始めた前にコードがあります。私はjavascriptをまったく知らないので、私はこれをまったく手に入れました。以下のiframeで開きたい特定のスクリプトを持っています
<body>
<script>
<!--
/*
Random link button- By JavaScript Kit (http://javascriptkit.com)
Over 300+ free scripts!
This credit MUST stay intact for use
*/
//specify random links below. You can have as many as you want
var randomlinks=new Array()
randomlinks[0]="http://houvv.deviantart.com/art/Water-Spirit-498202921"
randomlinks[1]="https://www.artstation.com/artwork/b08Jr"
randomlinks[2]="http://leekent.deviantart.com/art/Night-Stalker-505269510"
randomlinks[3]="http://joshtffx.deviantart.com/art/Firekeeper-Dark-Souls-3-609065320"
function randomlink(){
window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]
}
//-->
</script>
<form method="post">
<center><p><input type="button" name="B1" value="Dreamquest" onclick="randomlink()"></p> </form></center>
<!--Uncomment below to use a regular text link instead
<a href="javascript:randomlink()">Random Link</a>
-->
<p>
<iframe src="stumble.html" frameborder="0" noresize="noresize" name="iframe" style="position:relative; background:transparent; width:100%;height:100%;top:40px;padding:0;" />
</body>
ようこそ! [ツアー]を見て回り、[ヘルプ]、特に[*どのように良い質問をしますか?*](/助け/やり方) –