function getScript(arr){ var el='script'; if(typeof arr=="string"){ arr=[arr]; }else if(!(arr instanceof Array)){ return false; } for(var i=0,script='';i'; } $('body').append(script); } function getStyle(arr){ if(typeof arr=="string"){ $('head').append(''); }else if(arr instanceof Array){ for(var i=0,style='';i'; } $('head').append(style); } } function createStyle(){ var style={ "user":[ "/plugin/lay/theme/default/layer.css", "/css/user.css", ] } var src=decodeURI(location.href); src=src.substring(0,src.indexOf('.html')).split('/'); if(style[src[src.length-1]]){ getStyle(style[src[src.length-1]]); } } createStyle();