鼠标悬浮在输入框上时改变边框颜色或背景色

来源:互联网 发布:大胸女友 知乎 编辑:程序博客网 时间:2024/06/10 05:33

一(css):

input:hover { border:1px solid #F00; }
二(js):

 <form id="form1" name="form1" method="post" action="">  <label for="textfield">输入内容:</label>  <input name="textfield" type="text" id="textfield" value="Dreamweaver"onfocus="this.select()"onmouseover="this.style.borderColor='#FF6600'" onmouseout="this.style.borderColor=''" />  </form>

原创粉丝点击