我的代码为啥不显示
<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函数</title>
<script type="text/javascript">
function compare(x,y){
if(x>y){
return x;
}else if(x<y){
return y;
}else{
return x;
}
}
result1=compare(5,4);
result2=compare(6,3);
document.write(" 5 和 4 的较大值是:"+result1+"<br/>");
document.write(" 6 和 3 的较大值是:"+result2);
</script>
</head>
<body>
</body>
</html>