<select id='info' onchange='change(this)'>
  <option value='student' selected>学生
  <option value='tester'>考生
</select>
<br>
<label id='lab'>学号</label>
<script>
  function change(obj){
    document.getElementById('lab').innerText = obj.options[obj.selectedIndex].text.substr(0,1)+'号';
  }
</script>