コードは非常にシンプルで、アイデアを与えるためだけです。ここではあまりナンセンスについて話すことはありません。ソースコードを提示するだけです。
コードコピーは次のとおりです。
<!doctype html>
<html>
<head>
<title> wechat js api demo </title>
<meta http-equiv = "content-type" content = "text/html; charset = utf-8">
<link rel = "dns-prefetch" href = "http://mmbiz.qpic.cn">
<link rel = "dns-prefetch" href = "http://res.wx.qq.com">
<Meta name = "Viewport" content = "width = device-width、height = device-height、inital-scale = 1.0;">
<Meta name = "Apple-Mobile-Web-App-capable" content = "yes">
<Meta name = "Apple-Mobile-Web-App-Status-Bar-Style" content = "black">
<Meta name = "format-detection" content = "電話= no">
<style type = "text/css">
p {
パディング:5px 10px;
}
</style>
<script type = "text/javascript" src = "weixinapi.js?v = 1"> </scrip>
</head>
<body>
<スクリプト言語= "javascript">
<! -
function class1(){
this.name = "class1";
this.aaa = "aaa";
this.shownam = function(){
アラート(this.name);
}
}
function class2(){
this.name = "class2";
}
var c1 = new class1();
var c2 = new class2();
//c1.shownam();
c1.shownam.call(c2); //メソッドのオブジェクト順列
c1.aaa.call(c2); //エラー、メソッド継承のみでのみ、属性はサポートされていません
- >
</script>
</body>
</html>
ここでは、特定のアイデアを自由にプレイできるように、すべての人のためにアイデアを紹介するだけです。