<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函数调用</title>
<script type="text/javascript">
function tcon()
{
alert("恭喜你学会函数调用了!");
}
</script>
</head>
<body>
<form>
<input type="button" value="点点我" onclick="tcon()">
</form>
</body>
</html>
提示调用函数错误
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>函数调用</title> <script type="text/javascript"> function tcon() { alert("恭喜你学会函数调用了!"); } </script> </head> <body> <form> <input type="button" value="点点我" onclick="tcon()"> </form> </body> </html>
我的是对的啊,弹出框显示:恭喜你学会调用函数了。。。