<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>01OperatorPrecedence.html</title>
<script>
var a=1;
document.write("a++ =" + a++ + "<br>");//1,因為先列印再運算
document.write("a=" + a + "<br><hr>");//2
var a = 1;
document.write("++a =" + ++a + "<br>");//2,因為運算再列印
document.write("a=" + a + "<br><hr>");//2
</script>
</head>
<body>
</body>
</html>
全站熱搜
留言列表