console
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<a href="https://www.bilibili.com/" target="_blank">bilibili</a>
<br>
<script>
var c=0;
function sum(a,b) {
c=a+b;
return c;
}
document.write("1和2的和为:" + sum(1, 2));
</script>
<br>
<script>
function isLeapYear(year)
{
if ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0))
{
return year + "年是闰年"+"<br/>";
}
else
{
return year + "年不是闰年"+"<br/>";
}
}
document.write(isLeapYear(2022));
document.write(isLeapYear(2000));
document.write(isLeapYear(2001));
</script>
</head>
<body>
</body>
</html>