怎么輸出大的數,需要修改哪里
<!DOCTYPE ?HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函數</title>
<script type="text/javascript">
function a(x,y){
? ? var x=parseInt(prompt("請輸入x"));
? ? var y=parseInt(prompt("請輸入y"));
? ? if(x>y){
? ? ? ? return x;
? ? }else if(x=y){
? ? ? ? return "兩數相等";
? ? }else{
? ? ? ? return y;
? ? }
??
}?
document.write(x+"和"+y+"的最大值是"+a(x,y)+"<br>");
</script>
</head>
<body>
? ? <form>
</body>
</html>
2017-02-02
<!DOCTYPE ?HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函數</title>
<script type="text/javascript">
? ? var x=parseInt(prompt("請輸入x"));
? ? var y=parseInt(prompt("請輸入y"));
? ??
function a(x,y){
? ??
? ? if(x>y){
? ? ? ? return x;
? ? }else if(x==y){
? ? ? ? return "兩數相等";
? ? }else{
? ? ? ? return y;
? ? }
??
}?
document.write(x+"和"+y+"的最大值是"+a(x,y)+"<br>");
</script>
</head>
<body>
</body>
</html>