// 外部 js ファイルを動的にロードします
var フラグ= true;
if( flag ){
loadScript( "js/index.js" )
}; script" ) ;
script.type = "type/javascipt";
script.src = url;
document.getElementsByTagName( "head" )[0].appendChild( script );
} ;
// js
if( flag ){
var script = document.createElement( "script" );
script.type = "text/javascript"; text = " ";
document.getElementsByTagName( "head" )[0].appendChild( script );
};
if( flag ); >loadCss( "css/base.css" );
function loadCss( url ){
var link = document.createElement( "link" ); /css" ;
link.rel = "stylesheet";
link.href = url;
document.getElementsByTagName( "head" )[0].appendChild( link );
};
/ / CSS スタイルを動的に読み込みます
if( flag ){
var style = document.createElement( "style" );
style.type = "text/css";
document.getElementsByTagName ( "head " )[0].appendChild( style );
varsheet = document.styleSheets[0]
insertRules(sheet,"#gaga1","background:#f00",0 ); 🎜>} ;
function insertRules(sheet,selectorTxt,cssTxt,position){
if(sheet.insertRule ){ // IE 以外のブラウザを決定します
sheet.insertRule( selectorTxt "{" cssTxt "} " 、位置 ;