多di公用一个css 按钮控制div 动态加载iframe 页面

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script language="JavaScript" type="text/JavaScript">
	
function showdiv(targetid,objN){
 var target=document.getElementById(targetid);
 var clicktext=document.getElementById(objN)
 if (target.style.display=="block")
 { target.style.display="none";
    clicktext.innerText="打开";
  } else { target.style.display="block"; clicktext.innerText='关闭';  }    
  iframe.src="http://www.baidu.com";
}
</script>
<style type="text/css">
#b1,#b2,#b3{ cursor: hand; cursor:pointer;}
#v1,#v2 ,#v3{width:100%;    height:300px }
.none { display: none; }
-->
</style>
 
</head>
<body>
 


 
<input id="b1" onclick="document.all.v1.innerHTML='<iframe src=\'http://www.sina.com\'></iframe>';showdiv('v1','b1');"type=button value=online1><br>  
<div id="v1" class="none"></div>

 
<input id="b2" onclick="document.all.v2.innerHTML='<iframe src=\'http://www.sina.com\'></iframe>';showdiv('v2','b2');"type=button value=online2><br>  
<div id="v2" class="none"></div>

 
 <textarea>
	 代码需要维护 src段不允许换行 空格
 </textarea>
</body>
</html>
</body>
</html>