请问:按钮的背景颜色如何改变??在线等待

dzgbuild2001 2003-08-08 02:39:39
按钮的背景颜色如何改变??在线等待,急!!
...全文
38 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
possible_Y 2003-08-08
  • 打赏
  • 举报
回复
<style>
.m{BACKGROUND-COLOR: red}
.y{BACKGROUND-COLOR: blue}
</style>
<input type="button" class="m" onmouseOver="this.className='y'" onmouseOut="this.className='m'">
par 2003-08-08
  • 打赏
  • 举报
回复
简单点
<input type="button" value="ABC News " class="initial2">

<style>
<!--
.initial2{background-color:lime}
//-->
</style>
possible_Y 2003-08-08
  • 打赏
  • 举报
回复
<input type="button" style="BACKGROUND-COLOR: red">
awaysrain 2003-08-08
  • 打赏
  • 举报
回复
<input type="button" name="Button" value="Button" style="background-color: #0000FF">
par 2003-08-08
  • 打赏
  • 举报
回复
<head>
<style>
<!--
/*change the color name below to the color you want initially applied to the button. ie:blue*/

.initial2{font-weight:bold;background-color:lime}
//-->
</style>

<script>
<!--

/*
Rollover background-color button Script-
?Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

function change(color){
var el=event.srcElement
if (el.tagName=="INPUT"&&el.type=="button")
event.srcElement.style.backgroundColor=color
}

function jumpto2(url){
window.location=url
}

//-->
</script>
</head>
<body>
<form onMouseover="change('yellow')" onMouseout="change('lime')">
<input type="button" value="Yahoo " class="initial2" onClick="jumpto2('http://yahoo.com')">
<input type="button" value="Geocities " class="initial2" onClick="jumpto2('http://Geocities.com')">
<input type="button" value="ABC News " class="initial2" onClick="jumpto2('http://abcnews.com')">
</form>

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧