62,061
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript" language="javascript">
function ChangeChannel(orderid){
//var iframesrc= document.getElementById("iframe1").src;
if(orderid ==1)
{
document.getElementById("iframe1").src="http://www.baidu.com";
}
else if(orderid ==2)
{
document.getElementById("iframe1").src="http://www.google.com";
}
}
</script>
<form id="form1" runat="server">
<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="11"><img src="Images/tab_bg_left.gif" width="11" height="31" /></td>
<td width="389" >
<a href="javascript:void(0);" class="TechTabComm" id="Channel13" onclick="ChangeChannel(1);">tab1</a>
<a href="javascript:void(0);" class="TechTabComm" id="Channel14" onclick="ChangeChannel(2);">tab2</a>
</td>
<td width="10"></td>
</tr>
</table>
<iframe id="iframe1" style="width:388px;height:260px" src="http://www.baidu.com" frameborder="no" border="0" framespacing="0">
</iframe>
</form>
function ChangeChannel(orderid){
var iframesrc= document.getElementById("iframe1").src;
if(orderid ==1)
{
document.getElementById("iframe1").src="http://www.baidu.com";
}
else if(orderid ==2)
{
document.getElementById("iframe1").src="http://www.google.com";
}
//或者
function ChangeChannel(orderid){
var iframesrc= document.getElementById("iframe1");
if(orderid ==1)
{
iframesrc.src="http://www.baidu.com";
}
else if(orderid ==2)
{
iframesrc.src="http://www.google.com";
}
。<head runat="server">
<title>无标题页</title>
<frameset cols="165,*,8" frameborder="no" border="0" framespacing="0">
<frame name="left" target="left" src="left.aspx" frameborder="no" scrolling="No" noresize="noresize" border="0" framespacing="0" >
<frame name="main" src="index.aspx" target="main">
<frame name="right" target="right" src="right.aspx" frameborder="no" scrolling="No" noresize="noresize" border="0" framespacing="0" >
<noframes>
</noframes>
</frameset>
</head>
<a href="xxxx.aspx" target="main">TEST</a>