1.javascript 设置控件的样式.有如下控件
<asp:DropDownList name="DDLFwlx" id="DDLFwlx" runat="server" Width="88px">
<asp:ListItem>门对门</asp:ListItem>
<asp:ListItem>直达车</asp:ListItem>
</asp:DropDownList>
设置他的样式的脚本为:
document.getElementById('<%=DDLFwlx.ClientID%>').style.display="none";
给他赋值为:
document.getElementById('<%=DDLFwlx.ClientID%>').value="值";
应注意的事..如你的页面没有模板页的..页面运行的时候他的id是不会变的..否则他将加上模板页的一名称形成一个新的ID,
<%=DDLFwlx.ClientID%> 这个就是获取他生成的新id方法.