html设置背景色和字体颜色--兼容各浏览器

复制代码
 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
复制代码
posted @   ®Geovin Du Dream Park™  阅读(4865)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
< 2009年8月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示