<html>
<body>
<p id="demo">This is a paragraph.</p>
<select onchange="myFunction(this);" size="3">
<option>normal</option>
<option>italic</option>
<option>oblique</option>
</select>
<script>
function myFunction(selectTag) {
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("demo").style.fontStyle = listValue;
}
</script>
</body>
</html>