js 手动插入meta标签和script标签

        // 插入 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);
// 插入 script 标签
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "index.js";
document.getElementsByTagName('head')[0].appendChild(script);
上一篇:PHP生成HTML页面顶部出现空白部分(字符?)


下一篇:Create views of OpenCASCADE objects in the Debugger