Javascript calls WeChat API and callapi using call

Source: Internet
Author: User
Tags prefetch

Javascript uses call to call API, callapi

The code is very simple. I just want to give you a thought. There is not much nonsense here. Here is the source code:

Copy codeThe Code is as follows:
<! DOCTYPE html>
<Html>
<Head>
<Title> 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, inner-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>
</Head>
<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 replacement, for methods
C1.aaa. call (c2); // error. It can only be inherited from methods, and attributes are not supported.
-->
</Script>

</Body>
</Html>

Here is just an introduction to the idea. Let's take full advantage of the specific friends.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.