1. 程式人生 > 其它 >釘釘自定義機器人介紹及程式碼

釘釘自定義機器人介紹及程式碼

由於需要使用jQueryajax方法,所以要引入

var script = document.createElement('script');
script.setAttribute('type','text/javascript');
script.setAttribute('src',"https://code.jquery.com/jquery-3.1.1.min.js");
document.getElementsByTagName('head')[0].appendChild(script);

jQuery的版本可以通過直接更改一句為以下幾個地址:

script.setAttribute('src',"jQuery的地址");

jQuery官網引用地址:
3.1.1版本:https://code.jquery.com/jquery-3.1.1.min.js
3.0.0版本:https://code.jquery.com/jquery-3.0.0.min.js
2.1.4版本:https://code.jquery.com/jquery-2.1.4.min.js
百度引用地址:http://libs.baidu.com/jquery/2.1.4/jquery.min.js
微軟引用地址:http://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js
等等

var script = document.createElement('script');
script.setAttribute('type','text/javascript');
script.setAttribute('src',"https://code.jquery.com/jquery-3.1.1.min.js");
document.getElementsByTagName('head')[0].appendChild(script);