最赞回答 / qq_无名_84
function total(){var message=confirm("现在开始接受提问:");if(message==true){var question=prompt("你喜欢什么东西?");if(question!=null){document.write("好的,谢谢参与!");}else if {alter("没有输入,请重新输入!");}else{document.write("好的,尊重你的选择!");}}有下划线的是你写错的地方,else不能单独使用,前面要有if
2017-03-11
最新回答 / 犇犇犇犇犇犇
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>confirm</title> <script type="text/javascript"> function Wopen() { var mychar =confirm("是要打开新的窗口吗"); if(m...
2017-03-10
最新回答 / 慕UI2890912
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>close()</title> <script type="text/javascript"> function rec(){ var mywin=window.open("http://www.imooc.c...
2017-03-08
最新回答 / Ercy
obj不是用来命名的,你随便改成其他的名字都行,my.removeAttribute("style)有问题下面的代码是有用的<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" Content="text/html; charset=utf-8" /><title>javascript</title><style type="text/css">body{f...
2017-03-08