这是一个asp.net普通javascript的练习,是使用javascript去获取DropDownList Selected 选项的信息,如text,value和index等。
Insus.NET在.aspx.cs内准备好一些数据,是有关浏览器相关信息的,并写在泛型Dictionary<T,V>:
private Dictionary<string, string> GetBrowser() { Dictionary<string, string> dict = new Dictionary<string, string>(); dict.Add("google", "chrome"); dict.Add("Mozilla", "firefox"); dict.Add("microsoft", "ie"); dict.Add("opera", "opera"); dict.Add("safari", "apple"); return dict; }