js 控制不同客户端 访问不同CSS js


  1. function loadCSS(flag) {
  2. var t='.css';
  3. if((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|wOSBrowser|BrowserNG|WebOS)/i))) {
  4. t="_mobile.css";
  5. }
  6. if(flag=='esfdetail'){
  7. document.write('<link href="'+(baseURL+'/themes/default/css/common'+t)+'" rel="stylesheet" type="text/css" media="screen" />');
  8. document.write('<link href="'+(baseURL+'/themes/default/css/detail'+t)+'" rel="stylesheet" type="text/css" media="screen" />');
  9. }
  10. }


posted on 2017-03-22 14:41  signheart  阅读(685)  评论(0编辑  收藏  举报

导航