代码如下:
<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;
解决方案 »
- JS
- <object declare></object>【这个属性怎样用?】
- 求助一个jquery的问题!!!!
- 请问Ajax怎么获析数据
- 滚动导致下拉框中的内容与旁边的内容出现短暂性错位?亟待解决,望各位大大援手,关乎生计啊!!!!
- 于是我一下子无语了,竟然又有一个简单的题目怎么写也写不出来
- JavaScript数组定义
- window.showModalDialog()可以打开一个空白窗口,并在新窗口内用document.write向模态窗口内写javascript脚本吗?
- 如何实现在表单提交后,仍然保持下拉菜单项上一次的状态,在线等,急
- 网页加载时自动执行JS方法
- 火狐和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中