首页 > 代码库 > JavaScript 入門
JavaScript 入門
<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=http://www.mamicode.com/"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=http://www.mamicode.com/"‘+cssName+‘"type="text/css"/>‘);
</script>
</head>
<body>
<script type="text/javaScript">
document.write(‘<p>Appeelied Stype:‘+resolutionInfo+‘</p>‘);
</script>
</body>
</html>
JavaScript 入門