asp.net 把下拉列表的值赋值给文本框,DropDownList赋值给TextBox

//把下拉值赋给文本框
function ddlToText()
{
    var ddl=document.getElementById("ctl00_ContentPlaceHolder1_ddl").value;//byid里的ID要用解析后的HTML里的ID
    var text=document.getElementById("ctl00_ContentPlaceHolder1_text");

    if(isNAN(ddl))
    {
        text.value = ddl;
    }
    else
    {
        text.value = "";
    }
}


黑色头发:http://heisetoufa.iteye.com/

你可能感兴趣的:(C++,c,.net,asp.net,asp)