回复 7楼 冰镇柠檬汁儿
我试试了 保存是html的格式没有出错,保存了js格式就出现了错误
以下是引用柳逸尘在2015-10-19 08:50:09的发言:
<html>
<head>
<script scr="library.js"></script>
<title>客户端</title>
</head>
<body>
<script>
function moveon()
var answer=confirm("准备好了吗?");
if(answer)window.location="
setTimeout(moveon,60000);
</script>
</body>
</html>
在function moveon()后面没有加大括号,在cs6中显示居然没有出错,加上了大括号就出错了
<html>
<head>
<script scr="library.js"></script>
<title>客户端</title>
</head>
<body>
<script>
function moveon()
var answer=confirm("准备好了吗?");
if(answer)window.location="
setTimeout(moveon,60000);
</script>
</body>
</html>
在function moveon()后面没有加大括号,在cs6中显示居然没有出错,加上了大括号就出错了
if 判断语句也加上花括号
程序代码:
<html>
<head>
<script scr="library.js"></script>
<title>客户端</title>
</head>
<body>
<script>
function moveon(){
var answer=confirm("准备好了吗?");
if(answer){
window.location="}
}
setTimeout(moveon,60000);
</script>
</body>
</html>










就这我还是没有明白
我明白你说的,但是我使用cs6软件编译的时候就会出错,可能是软件我没有设置好,我再看看。