function def()
{ var key = document.getElementById ('selectarea'); //select list var value = document.getElementById ('DocAuthor'); //input text
//两种不同的取值
value.value = key.options[key.selectedIndex].text; //取得select list已选项的文本(显示给用户的值)赋给input text value.value = key.options[key.selectedIndex].value; //取得select list已选项的value(正真传递的值)赋给input text}