JS得到DropDownList的Value和Text

function CheckSelectNS()
            
{            
                
var selectText = document.FormStatus.DropDownListLevelSite.options[document.FormStatus.DropDownListLevelSite.selectedIndex].text 
                   
//var selectValue = document.getElementById("DropDownListLevelSite").value
                
if (selectText.substr(0,1!= "-")  
                
{        
                    alert(
"Please select ns site!");
                    document.getElementById(
"DropDownListLevelSite").selectedIndex = "0";
                }
                
            }
        

posted on 2007-01-16 20:40  Sammy  阅读(826)  评论(0编辑  收藏  举报

导航