<script>
function change(org)
{
if (org=="A")
{
document.Myframe.location.href="A.htm";
}
else
{
document.Myframe.location.href="B.htm";
}
}
</script>
<input type=button name="A" value="TestA" onclick=change(this.name);>
<input type=button name="B" value="TestB" onclick=change(this.name);>
<iframe name=Myframe src="tmp.htm"></iframe>
function change(org)
{
if (org=="A")
{
document.Myframe.location.href="A.htm";
}
else
{
document.Myframe.location.href="B.htm";
}
}
</script>
<input type=button name="A" value="TestA" onclick=change(this.name);>
<input type=button name="B" value="TestB" onclick=change(this.name);>
<iframe name=Myframe src="tmp.htm"></iframe>
<script>
function change(org)
{
if (org.name=="A")
{
document.Myframe.location.href="A.htm";
}
else
{
document.Myframe.location.href="B.htm";
}
}
</script>
<input type=button name="A" value="TestA" onclick=change(this);>
<input type=button name="B" value="TestB" onclick=change(this);>
<iframe name=Myframe src="tmp.htm"></iframe>不能跨域访问..
function change(org)
{
if (org.name=="A")
{
document.all.Myframe.src="A.htm";
}
else
{
document.all.Myframe.src="B.htm";
}
}
</script>
<input type=button name="A" value="TestA" onclick=change(this);>
<input type=button name="B" value="TestB" onclick=change(this);>
<iframe name=Myframe src=tmp.htm></iframe>再看看!
<script>
function change(org)
{
if (org.name=="A")
{
document.all.Myframe.src="A.htm";//document.Myframe.location.href="A.htm";亦可
}
else
{
document.all.Myframe.src="B.htm";//document.Myframe.location.href="B.htm";亦可
}
}
</script>
<input type=button name="A" value="TestA" onclick=change(this);>
<input type=button name="B" value="TestB" onclick=change(this);>
<iframe name='Myframe' id='Myframe' src=tmp.htm></iframe>