码迷,mamicode.com
首页 > 编程语言 > 详细

JavaScript 入門

时间:2014-09-11 15:06:52      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:des   style   color   io   java   ar   html   on   c   

<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus?">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>CSS Resolution Demo</title>
  <link rel="StyleSheet" href="basic.css" type="text/css"/>
  <script type="text/JavaScript">
  var cssName;
  var resolutionInfo;
  if(screen.availWidth<650){
      cssName=‘lowres.css‘;
      resolutionInfo=‘low resolution‘;
  }else{
      if(screen.availWidth>1000){
          cssName=‘highres.css‘;
          resolutionInof=‘high resolution‘;
      }else{
          cssName=‘lowres.css‘;
          resolutionInfo=‘medium resolution‘;
      }
  }
  document.write(‘<link rel="StyleSheet" href="‘+cssName+‘"type="text/css"/>‘);
  </script>
</head>
<body>
  <script type="text/javaScript">
  document.write(‘<p>Appeelied Stype:‘+resolutionInfo+‘</p>‘);
  </script>
</body>
</html>

JavaScript 入門

标签:des   style   color   io   java   ar   html   on   c   

原文地址:http://www.cnblogs.com/vonk/p/3966301.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!