日期:2014-05-16 浏览次数:20397 次
<!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>
<title>Untitled Page</title>
<script type="text/javascript">
var testA = {
t1: "a"
};
(function () {
this.previousTestA;
previousTestA=testA;
testA=function(p1){
alert(p1);
};
}).call(this);
previousTestA();
</script>
</head>
<body>
</body>
</html>
var testA = {
t1: "a"
};
function Pre() {
testA=function(){
alert('1111');
};
this.previousTestA;
this.previousTestA=testA;
};
var p = new Pre();
console.log(p.previousTestA())