質問が漠然としすぎて
何を答えればいいのか良いのか判らないですw
取あえずIFRAMを操作するサンプルを・・
<script type="text/javascript">
function changeCol(){
R=Math.floor(Math.random()*0xFF).toString(16);
if(R.length<2)R="0"+R;
G=Math.floor(Math.random()*0xFF).toString(16);
if(G.length<2)G="0"+G;
B=Math.floor(Math.random()*0xFF).toString(16);
if(B.length<2)B="0"+B;
window.parent.f.document.bgColor="#"+R+G+B;
}
function changeChar(){
Ary=["A","B","C","D","E","F","G","H","I","J"];
x=Math.floor(Math.random()*Ary.length);
str="";
for(i=0;i<300;i++){
str+=Ary[x];
if((i+1)%30==0)str+="<br>"
}
window.parent.f.document.body.innerHTML=str;
}
</script>
<body>
<input type="button" value="背景色変更" onclick="changeCol()" />
<input type="button" value="文字変更" onclick="changeChar()" />
<br>
<iframe name="f" src="about:blank" style="width:400px;height:250px;"></ifram>
</body>
ボタンを何度か続けて押してみて・・
.
お礼
ありがとうございます。なるほど、name 属性で判別すればいいんですね。