作业提交总是提示错误,实在不明所以,求教!
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>函数调用</title> <script type="text/javascript"> function context(){ alert("哈哈,调用函数了!"); } context(); </script> </head> <body> <form> <input type="button" value="点击我" onclick="context()" /> </form> </body> </html>
为什么这个代码提交失败呢?