文章内容
1、插入 meta 标签
// 插入 meta 标签
var oMeta = document.createElement('meta');
oMeta.content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0, user-scalable=0';
oMeta.name = 'viewport';
document.getElementsByTagName('head')[0].appendChild(oMeta);
2、插入 script 标签
// 插入 script 标签
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "index.js";
document.getElementsByTagName('head')[0].appendChild(script);