修改如下,javascript是大小写敏感的语言
<html>
<head>
<title> function的应用</title>
<script language="javascript">
function fun(){
with(Math)
{
a=PI * PI
b=cos(a)
c=exp(5)
}
alert(a)
alert(b)
alert(c)
}
</script>
</head>
<body background="1036152394.jpg">
<form>
<input type="button" value="输出" name="press" onClick="fun()"></form>
</body>
</html>
<html>
<head>
<title> function的应用</title>
<script language="javascript">
function fun(){
with(Math)
{
a=PI * PI
b=cos(a)
c=exp(5)
}
alert(a)
alert(b)
alert(c)
}
</script>
</head>
<body background="1036152394.jpg">
<form>
<input type="button" value="输出" name="press" onClick="fun()"></form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货