摘要: 一、根据元素的ID找到该元素,存于一个变量中: var a = document.getElementById("id"); 然后可以对该元素的属性进行操作: a.setAttribute("属性名","属性值"); 设置一个属性,添加或更改都可以; a.getAttribute("属性名");获取 阅读全文
posted @ 2016-05-11 15:10 屈震 阅读(221) 评论(0) 推荐(0) 编辑
摘要: <title>无标题文档</title><style type="text/css">.a{ height:40px; width:80px; position:absolute;}#a{ background-color:#00C; top:200px; left:300px; overflow: 阅读全文
posted @ 2016-05-11 15:08 屈震 阅读(142) 评论(0) 推荐(0) 编辑
摘要: <title>无标题文档</title><style>#a{ background-color:#FFF; border:#CCC solid 1px; height:250px; width:200px; left:10px; top:10px; z-index:1;} #b{ position: 阅读全文
posted @ 2016-05-11 15:08 屈震 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 位置:一般放于html之后,可以放到head里和body里。 写法:<script language/type="javascript">代码</script> 三个常用对话框: 警告对话框:alert("") 弹出一个警告对话框,输出内容。 确定对话框:confirm("") 弹出一个可供选择的确 阅读全文
posted @ 2016-05-11 15:07 屈震 阅读(240) 评论(0) 推荐(0) 编辑
摘要: <title>无标题文档</title><style type="text/css">.hei { color: #000;}</style></head> <body text="#CCCCCC" background="渐变色.jpg"> <table width="916" height="4 阅读全文
posted @ 2016-05-11 15:06 屈震 阅读(212) 评论(0) 推荐(0) 编辑
摘要: <title>汉企首页</title><style type="text/css">*{ margin:0px; padding:0px;}#d{ height:200px; width:1500px; left:5%; top:0px; position:fixed; z-index:100;}  阅读全文
posted @ 2016-05-11 15:05 屈震 阅读(119) 评论(0) 推荐(0) 编辑
摘要: <!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.or 阅读全文
posted @ 2016-05-11 15:02 屈震 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.文本输入 文本框<input type="text" name="" id="" value="" /> 密码框<input type="password" name="" id="" value="" /> 文本域<textarea name="" id=&quo 阅读全文
posted @ 2016-05-11 15:00 屈震 阅读(202) 评论(0) 推荐(0) 编辑