Dropdownlist的SelectedIndex的有关问题?

Dropdownlist的SelectedIndex的问题???Me.DropDownList1.Attributes.Add( onchange ,javascript:alert(

Dropdownlist的SelectedIndex的问题???
Me.DropDownList1.Attributes.Add( "onchange ",   "javascript:alert(document.all( 'DropDownList1 ').SelectedIndex); ")
这样写弹出来是undefined

[解决办法]
不好意思错了..
Me.DropDownList1.Attributes.Add( "onchange ", "javascript:alert(document.all( 'DropDownList1 ').selectedIndex); ")要注意大小写