📄 5-39.html
字号:
<HTML>
<HEAD>
<TITLE> AJAX深入浅出--代码5-39</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
<script language="javascript">
function JsApple() {
var quality="good"; //private
this.color="red"; //public
this.weight=300; //public
JsApple.count=0;; //static
this.showApple=function() { //public
document.write("this apple's color is "+this.color+";this apple's weight is "+this.weight+"g!<br>");
}
JsApple.showAppleCount=function() { //static
document.write("JsApple.count="+JsApple.count+".<br>");
}
this.showQuality=function() { //public
document.write("this apple's quality is "+quality+"!<br>");
}
JsApple.count++;
}
var myApple = new JsApple();
myApple.showApple();
JsApple.showAppleCount();
myApple.showQuality();
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -