html设置背景色和字体颜色--兼容各浏览器
文章来源:365jz.com 点击数:
1798 更新时间:2009-09-18 10:17
参与评论
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
5
<title>缔友计算机信息技术有限公司--html设置背景色和字体颜色--兼容各浏览器Setting the bgColor & fgColor Properties</title>
6
<meta name="description" content="涂聚文,捷为工作室,经营信息流,物流,人力资源流,资本流的系统解决方案的开发与设计和服务,geoVI studio.Geovin Du. Systems Solution to Fund flow,and Information flow,and Material flow,and Control flow,and Human Resource.Applied software development,design and service。.">
7
<meta name="Robots" content="all index follow ">
8
<meta name="Author" content="涂聚文" />
9
<link rel="shortcut icon" href="http://www.dupcit.com/favicon.ico" type="image/x-icon" />
10
<link rel="icon" href="http://www.dupcit.com/favicon.ico" type="image/ico" />
11
<link rel="Bookmark" href="http://www.dupcit.com/favicon.ico">
12
</head>
13
<body>
14
<DIV><p>
15
字体颜色
16
<form>
17
18
<input type="button"
19
value="White"
20
onClick="document.bgColor = '#FFFFFF';document.fgColor='#FF0000';">
21
22
<input type="button"
23
value="Green"
24
onClick="document.bgColor = '#008000';document.fgColor='#FFFF00';">
25
26
<input type="button"
27
value="Blue"
28
onClick="document.bgColor = '#0000FF';document.fgColor='#FFFFFF';">
29
30
<input type="button"
31
value="Red"
32
onClick="document.bgColor = '#FF0000';document.fgColor='#FFFF00';">
33
34
</form></p>
35
</DIV>
36
<FORM>
37
38
<H3>BackGround Colors</H3>
39
<INPUT TYPE="button" VALUE=" Red " onClick="document.bgColor = 'red'">
40
<INPUT TYPE="button" VALUE=" White " onClick="document.bgColor = 'white'">
41
42
<H3>ForeGround Colors</H3>
43
<INPUT TYPE="button" VALUE=" Blue " onClick="document.fgColor = 'blue'">
44
<INPUT TYPE="button" VALUE=" Green " onClick="document.fgColor = 'green'">
45
46
</FORM>
47
48
</body>
49
</html>
50
51
Tag标签: css
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
------分隔线----------------------------