.ubtn_Out{
font-family: "宋体";//定义按钮上的文字字体
font-weight: bold;//粗体
font-size:12px;//字体大小
border-color:Transparent;border-style:None;//边框透明,边框样式:None
background-color: Transparent;//按钮背景色为透明
width:47px;//按钮宽
height:19px;//按钮高
background-image:url(../images/index_29.jpg)//鼠标移出时按钮背景图片
}
//光标移入
.ubtn_Over{
font-family: "宋体";
font-weight: bold;
font-size:12px;
border-color:Transparent;border-style:None;
background-color: Transparent;
width:47px;
height:19px;
cursor:hand;//移入时光标呈手型
background-image:url(../images/index_29over.jpg);
}
//光标按下
.ubtn_Down{
font-family: "宋体";
font-weight: bold;
font-size:12px;
border-color:Transparent;border-style:None;
background-color: Transparent;
width:47px;
height:19px;
cursor:hand;
background-image:url(../images/index_29down.jpg)
}
button的onClick事件:
<input type="button" name="ok" value="确定" onClick="location.href='http://gsanidt.cnblogs.com'" onMouseOut="this.className='ubtn_Out'" onMouseOver="this.className='ubtn.Over'" onMouseDown="this.className='ubtn_Down'">
// onClick="location.href='http://gsanidt.cnblogs.com'"指在当前页面打开gsanidt技术博客首页
// onClick="window.open='http://gsanidt.cnblogs.com'"指在新页面打开gsanidt技术博客首页
button 设置
最新推荐文章于 2024-05-27 22:24:24 发布