鼠标放在button按钮颜色改变、、input按钮怎么添加超链接
更新:HHH   时间:2023-1-7


鼠标放在button按钮上时 按钮颜色改变 ?


<button onmouseover="this.style.backgroundColor='red';" onmouseout="this.style.backgroundColor='';" >button</button>


比较完整的写法:
<a href="链接"> 
  <input type=button onclick="window.location.href('连接')">
</a> 

注:1.若直接在本页跳转到新的页面,则用: <input type=button onclick="window.location.href('连接')"> 
  2.如果需要打开一个新的页面进行跳转,则用: <input type=button onclick="window.open('连接')">
返回开发技术教程...