纪录备忘:应用中的脚本应用
--1.服務器端的下拉框
<asp:DropDownList ID="ddlSelectLineType" runat="server" Width="50" ></asp:DropDownList>
?
在腳本中得到服務器端的下拉框的腳本代碼:
var first = $("ddlSelectLineType").value;
?
--2.服務器端的RadioButtonList
<asp:RadioButtonList ID="rblLineType" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal" οnclick="changeType();">
??????????????????????? <asp:ListItem Text="組1" Value="0" Selected="True"></asp:ListItem>
??????????????????????? <asp:ListItem Text="散2" Value="1"></asp:ListItem>
??????????????????????? </asp:RadioButtonList>
?
腳本代碼:
function changeType()
??? {
???????? var test=document.getElementsByName("rblLineType");
???????? for(var i=0;i<test.length;i++){
??????????? if(test[i].checked){
??????????????? if(test[i].value == "1"){
??????????????????? alert('散2!');
???????????????????}
??????????? }
????}
?
只是用于紀錄備忘.
轉載于:https://www.cnblogs.com/liyundong/archive/2008/09/24/1298101.html
總結
以上是生活随笔為你收集整理的纪录备忘:应用中的脚本应用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DateDiff 函数的用法
- 下一篇: 在wine里安装了IE6