📄 5-40.html
字号:
<HTML>
<HEAD>
<TITLE> AJAX深入浅出--代码5-40</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
<script language="javascript">
function JsFruit() {
this.name="";
this.original="";
this.showFruitInfor=function() {
document.write("this fruit's name is "+this.name+";this fruit's original is "+this.original+"!<br>");
}
}
function JsApple() {
var apple = new JsFruit();
apple.name="apple";
apple.original="china";
apple.color="red";
apple.weight=300;
apple.showAppleInfor=function() {
document.write("this apple's color is "+this.color+";this apple's weight is "+this.weight+"!<br>");
}
return apple;
}
var myApple = new JsApple();
myApple.showFruitInfor();
myApple.showAppleInfor();
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -