javascript改变字体颜色实例
2005-11-17 12:17
399 查看
我写的一个改变字体颜色的实例:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>字体颜色改变实例</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {color: #0000FF}
-->
</style>
</head>
<body>
<script language="javascript">
function gai()
{
if(test.style.color!=\'red\')
test.style.color=\'red\';
else
test.style.color=\'green\';
}
</script>
<p id="test">高增分</p>
<input type="button" value="提交" onClick="gai()">
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>字体颜色改变实例</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {color: #0000FF}
-->
</style>
</head>
<body>
<script language="javascript">
function gai()
{
if(test.style.color!=\'red\')
test.style.color=\'red\';
else
test.style.color=\'green\';
}
</script>
<p id="test">高增分</p>
<input type="button" value="提交" onClick="gai()">
</body>
</html>
相关文章推荐
- javascript改变字体颜色实例
- Android中颜色选择器和改变字体颜色的实例教程
- C# javascript 查找字体突出显示(改变大小、颜色)
- Javascript中单击按键来循环改变字体的颜色
- JAVASCRIPT通过点击按钮来改变字体颜色
- 【JavaScript】轻易改变的背景和字体颜色页面
- 怎样用javascript来改变链接中的文字的颜色和字体!!
- javascript鼠标经过背景色和字体颜色改变
- fontDialog,colorDialog,saveDialog改变字体大小,颜色,以后保存图片文件实例
- listview改变选中行的字体颜色实例介绍
- iOS----改变导航条title的字体大小和颜色
- 点击LinearLayout使用selector改变TextView字体颜色
- dev grdicontrol 根据条件改变行颜色,字体颜色等
- h1标签改变字体颜色、大小
- ALV中背景和字体颜色改变的做法
- 关于android自定义字体颜色和点击改变字体颜色
- ExtJS GridPanel 根据条件改变字体颜色
- Eclipse改变界面和字体颜色
- 改变 CListCtrl、CHeaderCtrl 高度、字体、颜色和背景
- Qt控件改变字体大小颜色