您的位置:首页 > Web前端 > HTML

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

2009-08-22 03:50 585 查看
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" />
<link rel="icon" href="http://www.dupcit.com/favicon.ico" type="image/ico" />
<link rel="Bookmark" href="http://www.dupcit.com/favicon.ico">
</head>
<body>
<DIV><p>
字体颜色
<form>

<input type="button"
value="White"
onClick="document.bgColor = '#FFFFFF';document.fgColor='#FF0000';">

<input type="button"
value="Green"
onClick="document.bgColor = '#008000';document.fgColor='#FFFF00';">

<input type="button"
value="Blue"
onClick="document.bgColor = '#0000FF';document.fgColor='#FFFFFF';">

<input type="button"
value="Red"
onClick="document.bgColor = '#FF0000';document.fgColor='#FFFF00';">

</form></p>
</DIV>
<FORM>

<H3>BackGround Colors</H3>
<INPUT TYPE="button" VALUE=" Red " onClick="document.bgColor = 'red'">
<INPUT TYPE="button" VALUE=" White " onClick="document.bgColor = 'white'">

<H3>ForeGround Colors</H3>
<INPUT TYPE="button" VALUE=" Blue " onClick="document.fgColor = 'blue'">
<INPUT TYPE="button" VALUE=" Green " onClick="document.fgColor = 'green'">

</FORM>

</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: