--------- div的应用 根据select 的值 来显示多少个select ---------
<script language="javascript">
function change()
{
var sum = document.Form1.num.selectedIndex;
var str = "";
var i;
for(i=1;i<=sum;i++)
{
str = str + "<select name=select"+i+">";
str = str + "<option selected>请选择</option>";
str = str + "<option Value=百姓话题>百姓话题 </option>";
str = str + "<option Value=业内交流>业内交流</option>";
str = str + "<option Value=土地信息>土地信息</option>";
str = str + "<option Value=地产人才>地产人才</option>";
str = str + "<option Value=企业服务>企业服务</option>";
str = str + "<option Value=搜索引擎及分类信息>搜索引擎及分类信息</option>";
str = str + "<option Value=娱乐新闻>娱乐新闻</option>";
str = str + "<option Value=贴图专区>贴图专区</option>";
str = str + "<option Value=搞笑世界>搞笑世界</option>";
str = str + "</select>";
str = str + "<br>";
}
div1.innerHTML=str;
}
</script>
<form id=Form1 method=post>
<tr>
<td style="HEIGHT: 14px">请选择:
<select onchange="change()" name="num">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select> <font color="red">*</font>你可以同时选择在6个板块发布你的主题 1 是默认本板块</td>
</tr>
<tr><td><div id=div1></div></td></tr></form>
后台获值 this.Request.Form["select4"].ToString()=="企业服务";
this.DropDownList1.SelectedValue.ToString()=="地产人才
<script language="javascript">
function change()
{
var sum = document.Form1.num.selectedIndex;
var str = "";
var i;
for(i=1;i<=sum;i++)
{
str = str + "<select name=select"+i+">";
str = str + "<option selected>请选择</option>";
str = str + "<option Value=百姓话题>百姓话题 </option>";
str = str + "<option Value=业内交流>业内交流</option>";
str = str + "<option Value=土地信息>土地信息</option>";
str = str + "<option Value=地产人才>地产人才</option>";
str = str + "<option Value=企业服务>企业服务</option>";
str = str + "<option Value=搜索引擎及分类信息>搜索引擎及分类信息</option>";
str = str + "<option Value=娱乐新闻>娱乐新闻</option>";
str = str + "<option Value=贴图专区>贴图专区</option>";
str = str + "<option Value=搞笑世界>搞笑世界</option>";
str = str + "</select>";
str = str + "<br>";
}
div1.innerHTML=str;
}
</script>
<form id=Form1 method=post>
<tr>
<td style="HEIGHT: 14px">请选择:
<select onchange="change()" name="num">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select> <font color="red">*</font>你可以同时选择在6个板块发布你的主题 1 是默认本板块</td>
</tr>
<tr><td><div id=div1></div></td></tr></form>
后台获值 this.Request.Form["select4"].ToString()=="企业服务";
this.DropDownList1.SelectedValue.ToString()=="地产人才