一、代码:
<!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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>无标题 1</title>
<script>
Math.PI=Math.PI+1;
var a= (Math.PI++);
var b = (Math.PI++);
alert(a);
alert(b);
</script>
</head>
<body>
</body>
</html>
二、结果:
输出全是3.141592653589793,没有改变,说明系统对象的属性是只读的。