var a
a=screen.width;
获取了屏幕的宽 根据这个值 想用switch去对应加载css但是不知道如何写 求教
解决方案 »
- JSP中既能显示javaScrip对话框所需要的内容,又要执行添加到SQL操作??
- 请教node.childNodes中,子元素个数问题。
- winow.showModalDialog()弹出窗体右上角的关闭按钮不可用 javascript 弹出窗体 关闭按钮不可用
- 表单事件嵌套,不好描述进来看吧:)
- IE SP2中,无法运行第三方ActiveX控件,老是提示不允许!
- 如何获取一个日期是它所在月的第几周
- 招聘JAVA程序员及美工
- 关于透明文本框?
- 怎么样给上专文件控件(<input type=file name=file1>付值!谢谢
- 哪里有Javasscript的好书下载?谢谢。
- Jquey未定义
- 你们是怎么做的?关于限制前台页面输入字符串长度
style.type = "text/css";
style.rel = "stylesheet";
style.href = 'a.css';document.getElementsByTagName('head')[0].appendChild(style)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
var a
a=screen.width;var style = document.createElement('link');
style.type = "text/css";
style.rel = "stylesheet";
style.href = 'a.css';document.getElementsByTagName('head')[0].appendChild(style)
break;
</script>
</head><body>
<div class="a"></div>
</body>
</html>1280.css文件如下 都是放在桌面的文件.a{
width:500px;
height:500px;
background-color:#999900;}