慕旧
2017-12-12 14:15
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>函数传参</title> <script type="text/JavaScript"> function add3(x,y,z) { var x=5; var y=8; var z=3; sum = x + y +z; document.write(x+"、"+y+"、"+z+"和:"+sum+"<br/>"); } </script> </head> <body> <input type="button" value="点击" oncilik=" add3()"> </body> </html>
这句写错啦
oncilik=" add3()" ->onclick="add3()"
oncilik=" add3()"写错了,onclick="add3()"
JavaScript进阶篇
468195 学习 · 21891 问题
相似问题