<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函数</title>
<script type="text/javascript">
function nd(a,b){
var n= a>b?a:(a==b?"相等":b);
return n;
}
var p= nd(5,4);
var q= nd(6,3);
var o= nd(3,3);
document.write(" 5 和 4 的较大值是:"+p+"<br>");
document.write(" 6 和 3 的较大值是:"+q +"<br>"); document.write(" 3 和 3 的较大值是:"+o );
</script>
</head>
<body>
</body>
</html>