但如果不把
print"<input type=button id=bb value='show' onclick='loadchild()'>";
这句放进PHP里,却可以正常控制,测试网址如下:
http://www.ggajj.net/test/list.php http://www.ggajj.net/test/listb.php在线呀,请指正
print"<input type=button id=bb value='show' onclick='loadchild()'>";
这句放进PHP里,却可以正常控制,测试网址如下:
http://www.ggajj.net/test/list.php http://www.ggajj.net/test/listb.php在线呀,请指正
function loadchild()
{
if (event.srcElement.value=="show")
{
event.srcElement.value="hidden";
document.all.IFrame1.src="http://www.ggajj.net/indexb.html";
document.all.IFrame1.width="100%";
document.all.IFrame1.height=100; }
else if (event.srcElement.value=="hidden")
{
event.srcElement.value="show";
document.all.IFrame1.src="";
document.all.IFrame1.width=0;
document.all.IFrame1.height=0; }}
</script>
-------
function loadchild(o)
{
if (o.value== "show ")
{
o.value= "hidden ";
document.all.IFrame1.src= "http://www.ggajj.net/indexb.html ";
document.all.IFrame1.width= "100% ";
document.all.IFrame1.height=100;
}
else if (o.value== "hidden ")
{
o.value= "show ";
document.all.IFrame1.src= " ";
document.all.IFrame1.width=0;
document.all.IFrame1.height=0;
}
}
</script > 调用
<input onclick="loadchild(this)">
也就是点击那一个BUTTON就在那一个BUTTON下面显示,又如何?
2) 如何控制iframe根本SRC 页面的内容页自动改变高度,宽度?
(我试着用height="100%" 不行的?)