<!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">
var numa=1;
var numb=7;
numa++;
numb--;
document.write("numa的值:"+numa);
document.write("numb的值:"+numb);
</script>
</head>
<body>
</body>
</html>
请查看所有符号是否是英文输入法输入的,a++和b--后面的分号是中文的,你换成英文的就可以了