日期:2014-05-16 浏览次数:20353 次
<!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>Untitled Document</title>
<script type="text/javascript">
(function() {
var object = function() {};
var ooo = {};
ooo.sh = {};
var i = 0;
object.showName = function() {
alert(i);
};
object.prototype.setName = function() {
i = 9999999999999999999999999999999;
};
ooo.sh.showName = function() {
alert(i);
};
window.obj = object;
window.ooo = ooo;
})();
window.obj.setName();
ooo.sh.showName();
</script>
</head>
<body>
</body>
</html>