<html>
<body>
<p id="demo" style="font:italic bold 30px Georgia,serif;">这是段落。</p>
<button type="button" onclick="myFunction()">返回字体</button>
<script>
function myFunction() {
alert(document.getElementById("demo").style.font);
}
</script>
</body>
</html>