代码如下:
<table width="480" border="0" cellpadding="0" class="STYLE3" cellspacing="0" bordercolor="#ECE9D8" bgcolor="#FFFFFF">
<tr>
<td class="STYLE3" scope="row">www</td>
<td class="STYLE3" scope="row">
<select name="method" id="method" onchange="MM_jumpMenu('parent',this,0)">
<option value="sss">aaa</option>
<option value="www">bbb</option>
</select></td>
</tr>
<fieldset id="tds0" style="display:none">
<tr>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">ttt</td>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">
<input name="user" type="text" id="user" /></td>
</tr>
<tr>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">密码:</td>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row"><span class="STYLE6">
<input name="pwd" type="text" id="pwd" /></span></td>
</tr>
</fieldset>
<fieldset id="tds1" style="display:none">
<tr >
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">IP地址:</td>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">
<input name="ip" type="text" id="IPstatic" size="16" maxlength="16" /></td>
</tr>
<tr >
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">DNS服务器:</td>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">
<input name="dns1" type="text" id="IPdns1" size="16" maxlength="16" /></td>
</tr>
</fieldset>
</tabe>
function MM_jumpMenu(targ,selObj,restore)
{
var indx=selObj.selectedIndex;
eval('document.getElementById("tds'+curmethod+'").style.display="none";');
eval('document.getElementById("tds'+indx+'").style.display="";');
curmethod=indx;
<table width="480" border="0" cellpadding="0" class="STYLE3" cellspacing="0" bordercolor="#ECE9D8" bgcolor="#FFFFFF">
<tr>
<td class="STYLE3" scope="row">www</td>
<td class="STYLE3" scope="row">
<select name="method" id="method" onchange="MM_jumpMenu('parent',this,0)">
<option value="sss">aaa</option>
<option value="www">bbb</option>
</select></td>
</tr>
<fieldset id="tds0" style="display:none">
<tr>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">ttt</td>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">
<input name="user" type="text" id="user" /></td>
</tr>
<tr>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">密码:</td>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row"><span class="STYLE6">
<input name="pwd" type="text" id="pwd" /></span></td>
</tr>
</fieldset>
<fieldset id="tds1" style="display:none">
<tr >
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">IP地址:</td>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">
<input name="ip" type="text" id="IPstatic" size="16" maxlength="16" /></td>
</tr>
<tr >
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">DNS服务器:</td>
<td height="30" align="left" bgcolor="#FFFFFF" class="STYLE3" scope="row">
<input name="dns1" type="text" id="IPdns1" size="16" maxlength="16" /></td>
</tr>
</fieldset>
</tabe>
function MM_jumpMenu(targ,selObj,restore)
{
var indx=selObj.selectedIndex;
eval('document.getElementById("tds'+curmethod+'").style.display="none";');
eval('document.getElementById("tds'+indx+'").style.display="";');
curmethod=indx;
解决方案 »
- 上传图片预览问题
- 求一个输入日期时过滤字符的正则表达式希望高手指点。
- 友情帮忙吧,分都问完了,请教下<BODY onload="Init();" onclick="f_MoveTo()" >这个click事件,当前页面只有很少的一些地方有文字,点击页面中的空白部分不会实行onclick事件,只有在点击有内容的地方才实行
- <div id="popup" style="width:300;" onblur="alert(1)"></div> 这句怎么不执行?
- 请教一个关于disabled的问题
- js读取excel有部分内容显示不出来
- 谁帮我解释下Jquery里面的ready()函数
- 如何写JS将已经DISABLED的文本INPUT框再变成重新有效
- 上传文件
- javascript 参数传递的问题
- 火狐和IE8下获取checkbox的HTML问题
- 那么如何设置图片的width="??" height="??"值?
var indx=selObj.selectedIndex;
curmethod=indx;
eval("document.getElementById('tds"+curmethod+"').style.display='none';");
curmethod=indx;
eval('document.getElementById("tds'+curmethod+'").style.display="none";');
eval('document.getElementById("tds'+indx+'").style.display="block";');
将其中的fieldset 改为table就可以了
fieldset 没有自己的显示区域,必须依附在table中