釘釘自定義機器人介紹及程式碼
阿新 • • 發佈:2021-10-11
由於需要使用jQuery
的ajax
方法,所以要引入
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);