日期:2014-05-16 浏览次数:20346 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script>
function change(){
var selVal = document.getElementById('select').options[document.getElementById('select').selectedIndex].value;
document.getElementById('text').value = selVal;
}
</script>
</head>
<body>
分类ID:<input type="text" class="text" id="text" /> <select onchange="change();" id="select"><option value="美容护肤">美容护肤</option><option value="电击疗法">电击疗法</option><option value="按摩去皱">按摩去皱</option></select>
</body>
</html>