<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>我们互动下</title> <script type="text/javascript"> document.write("JS进阶"); function login(){ var mymessage=confrim("i love you"); if(mymessage==true){ window.open('http://www.imooc.com','_black','width=100%,height=300px,menubar=no,toolbar=no'); }else{ alert("hahha"); } } </script> </head> <body> <input name="button" type="button" value="login" onclick="login()"/> </body> </html>
是confirm。。。。。
confrim单词写错了,confirm
单词拼错了,应该是“confirm”