Code is very simple, just give everyone a train of thought, here is not much nonsense, the source code:
Copy Code code as follows:
<! DOCTYPE html>
<title> micro-letter 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= "Telephone=no" >
<style type= "Text/css" >
p {
padding:5px 10px;
}
</style>
<script type= "Text/javascript" src= "Weixinapi.js?v=1" ></script>
<body>
<script language= "JavaScript" >
<!--
function Class1 () {
THIS.name = "Class1";
THIS.AAA = "AAA";
This.shownam = function () {
alert (this.name);
}
}
function Class2 () {
THIS.name = "Class2";
}
var C1 = new Class1 ();
var C2 = new Class2 ();
C1.shownam ();
C1.showNam.call (C2);//object substitution, for methods
C1.aaa.call (C2);//error, only method inheritance, property not supported
-->
</script>
</body>
Here is just the introduction of ideas to everyone, the specific small partners free play it.