<!DOCTYPE HTML><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>confirm</title> <script type="text/javascript"> function reca() { var aaa = confirm("Welcome!"); if (aaa == true) { alert("hello!my friend"); } else { docoment.write("hi!") } </script> </head> <body> <input type="button" name="button" value="点击这里" onclick="reca()" /> </body></html>求前辈指导指导
1 回答
已采纳
李晓健
TA贡献1036条经验 获得超461个赞
function reca() { var aaa = confirm("Welcome!"); if (aaa == true) { alert("hello!my friend"); } else { docoment.write("hi!") } //偷偷的告诉你,你最后少了一个 } 就是下面这一行 }
添加回答
举报
0/150
提交
取消