<html>
<body>
<script type="text/javascript">
function displayemail()
{
var emaillabel = document.getElementById("emaillabel")
var userlist = document.getElementById("userlist")
emaillabel.innerHTML = userlist.options[userlist.selectedIndex].email
}
</script>
<select onchange='displayemail();' id=userlist>
<option value="1" email="test1@test.com">Userid1</option>
<option value="2" email="test2@test.com">Userid2</option>
</select>
<div id=emaillabel></div>
</body>
</html>
<body>
<script type="text/javascript">
function displayemail()
{
var emaillabel = document.getElementById("emaillabel")
var userlist = document.getElementById("userlist")
emaillabel.innerHTML = userlist.options[userlist.selectedIndex].email
}
</script>
<select onchange='displayemail();' id=userlist>
<option value="1" email="test1@test.com">Userid1</option>
<option value="2" email="test2@test.com">Userid2</option>
</select>
<div id=emaillabel></div>
</body>
</html>