xxxxxxxxxx
<html>
<head>
<script>
function displayResult()
{
document.getElementById("p1").style.fontStyle="italic";
}
</script>
</head>
<body>
<p id="p1">This is some text.</p>
<br>
<button type="button" onclick="displayResult()">Change font style</button>
</body>
</html>